[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Mon Apr 12 05:18:47 MDT 2010
The branch, master has been updated
via d73a7e7... s3: Little refactoring: Factor out skip_space
via 8c3fa16... s3: Remove a bogus 0-check, "isspace" can not return true for \0
from 757766d... s3: Cache the result of the username map script
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit d73a7e7e9063083f73fcce5170ea9b9682d66ef6
Author: Volker Lendecke <vl at samba.org>
Date: Fri Apr 9 14:30:54 2010 +0200
s3: Little refactoring: Factor out skip_space
commit 8c3fa1668654f482168e0c565458e701c23d4d9b
Author: Volker Lendecke <vl at samba.org>
Date: Fri Apr 9 14:28:44 2010 +0200
s3: Remove a bogus 0-check, "isspace" can not return true for \0
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/map_username.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/map_username.c b/source3/smbd/map_username.c
index 8b1e1db..8c8eb2e 100644
--- a/source3/smbd/map_username.c
+++ b/source3/smbd/map_username.c
@@ -68,6 +68,14 @@ static bool set_last_from_to(const char *from, const char *to)
return true;
}
+static char *skip_space(char *s)
+{
+ while (isspace((int)(*s))) {
+ s += 1;
+ }
+ return s;
+}
+
bool map_username(struct smbd_server_connection *sconn, fstring user)
{
XFILE *f;
@@ -157,14 +165,11 @@ bool map_username(struct smbd_server_connection *sconn, fstring user)
*dosname++ = 0;
- while (isspace((int)*unixname))
- unixname++;
+ unixname = skip_space(unixname);
if ('!' == *unixname) {
return_if_mapped = True;
- unixname++;
- while (*unixname && isspace((int)*unixname))
- unixname++;
+ unixname = skip_space(unixname+1);
}
if (!*unixname || strchr_m("#;",*unixname))
--
Samba Shared Repository
More information about the samba-cvs
mailing list