From f74e40b075ec66ac396da955d632af7dc3fd6350 Mon Sep 17 00:00:00 2001 From: lissav Date: Fri, 12 Mar 2010 18:36:55 +0000 Subject: [PATCH] set request->{username} in bypass mode git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5460 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Client.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/perl-xCAT/xCAT/Client.pm b/perl-xCAT/xCAT/Client.pm index f52016df5..84ac36735 100644 --- a/perl-xCAT/xCAT/Client.pm +++ b/perl-xCAT/xCAT/Client.pm @@ -89,14 +89,14 @@ sub submit_request { unless ($certfile) { $certfile = xCAT::Utils->getHomeDir()."/.xcat/client-cred.pem"; } unless ($cafile) { $cafile = xCAT::Utils->getHomeDir()."/.xcat/ca.pem"; } $xCAT::Client::EXITCODE = 0; # clear out exit code before invoking the plugin -# add current userid to the request -if (!(defined($request->{username}))) { - $request->{username}->[0] = getpwuid($>); -} $request->{clienttype}->[0] = "cli"; # setup clienttype for auditlog # If XCATBYPASS is set, invoke the plugin process_request method directly # without going through the socket connection to the xcatd daemon if ($ENV{XCATBYPASS}) { + #add current userid to the request + if (!(defined($request->{username}))) { + $request->{username}->[0] = getpwuid($>); + } # Load plugins from either specified or default dir require xCAT::Table; my %cmd_handlers;