summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-07-07 16:58:29 +0000
committerJeremy Allison <jra@samba.org>1998-07-07 16:58:29 +0000
commit10dd9a6328df77cfc479164f61cb20f2be011b44 (patch)
tree7bdbfce9672a1ad1b05cd99d50ff5264886727df /source3/lib
parent3fc4dc60e5b03503cd0cefb28c98f37cec2e3719 (diff)
downloadsamba-10dd9a6328df77cfc479164f61cb20f2be011b44.tar.gz
samba-10dd9a6328df77cfc479164f61cb20f2be011b44.tar.bz2
samba-10dd9a6328df77cfc479164f61cb20f2be011b44.zip
Fixed (hopefully) last bug with username mapping.
map_username wasn't returning true on a map which was causing find_service not to find a home directory. Jeremy. (This used to be commit 97209a29467699173caf79e1c81729eb2afedda5)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/username.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/lib/username.c b/source3/lib/username.c
index 4237a42078..b79e6aefc3 100644
--- a/source3/lib/username.c
+++ b/source3/lib/username.c
@@ -58,6 +58,7 @@ BOOL map_username(char *user)
char *mapfile = lp_username_map();
char *s;
pstring buf;
+ BOOL mapped_user = False;
if (!*user)
return False;
@@ -119,6 +120,7 @@ BOOL map_username(char *user)
if (strchr(dosname,'*') || user_in_list(user,dosname)) {
DEBUG(3,("Mapped user %s to %s\n",user,unixname));
+ mapped_user = True;
fstrcpy(last_from,user);
sscanf(unixname,"%s",user);
fstrcpy(last_to,user);
@@ -132,14 +134,13 @@ BOOL map_username(char *user)
fclose(f);
/*
- * Username wasn't mapped. Setup the last_from and last_to
- * as an optimization so that we don't scan the file again
- * for the same user.
+ * Setup the last_from and last_to as an optimization so
+ * that we don't scan the file again for the same user.
*/
fstrcpy(last_from,user);
fstrcpy(last_to,user);
- return False;
+ return mapped_user;
}
/****************************************************************************