>From 357f201d70c446df93693306db231b52f7ec205b Mon Sep 17 00:00:00 2001
From: Simo Sorce <simo@redhat.com>
Date: Wed, 13 Nov 2013 20:03:53 -0500
Subject: [PATCH 2/2] Try impersonation even when a name is not provided

In some cases a name may not be provided, still try to perform
impersonation if the service is configured that way.
---
 proxy/src/gp_creds.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/proxy/src/gp_creds.c b/proxy/src/gp_creds.c
index e02a667a247a1587fcc52e1a72402fc8b27b853f..5337390220e9868fb23121a615952bbb6b8aa946 100644
--- a/proxy/src/gp_creds.c
+++ b/proxy/src/gp_creds.c
@@ -289,6 +289,11 @@ static int gp_get_cred_environment(struct gp_call_ctx *gpcall,
             }
             *requested_name = name;
         }
+    } else {
+        /* No name provided */
+        if (svc->euid != target_uid) {
+            user_requested = true;
+        }
     }
 
     /* impersonation case (only for initiation) */
-- 
1.8.4.2

