[SCM] Samba Shared Repository - branch master updated -
420a9071e1227435aada2a52c83ee44fda7180ed
sfrench at samba.org
sfrench at samba.org
Fri Dec 5 14:16:05 GMT 2008
The branch, master has been updated
via 420a9071e1227435aada2a52c83ee44fda7180ed (commit)
from 8be38511a3d87f4debbdc3a827b6ca898ccdde02 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 420a9071e1227435aada2a52c83ee44fda7180ed
Author: Steve French <stevef at smf-t60p.smfdom>
Date: Fri Dec 5 08:09:08 2008 -0600
mount.cifs: if mount user not specified use USER environment variable
smbfs also would use the USER environment variable if the user was not
specified on the mount command and no credential file specified, and
mount.cifs man page says that we will use this environment variable
(in most cases this will not cause a behavior change, because
we were doing getuid of the current process which will usually be
the same name).
Fixes Samba bug #5934
Acked-by: Jeff Layton
-----------------------------------------------------------------------
Summary of changes:
source3/client/mount.cifs.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/client/mount.cifs.c b/source3/client/mount.cifs.c
index da2f98b..0bc61ae 100644
--- a/source3/client/mount.cifs.c
+++ b/source3/client/mount.cifs.c
@@ -1293,7 +1293,13 @@ int main(int argc, char ** argv)
}
if(got_user == 0) {
- user_name = getusername();
+ /* Note that the password will not be retrieved from the
+ USER env variable (ie user%password form) as there is
+ already a PASSWD environment varaible */
+ if (getenv("USER"))
+ user_name = strdup(getenv("USER"));
+ if (user_name == NULL)
+ user_name = getusername();
got_user = 1;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list