summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-03-23 08:40:15 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-03-23 08:40:15 +0000
commitd6d9d6debdbf9bfa3fba287e0a1799e764c6b0d5 (patch)
tree20266e03c8392bdb75f5514a400c66c0cf143311 /source3/lib
parentfbdf45721b65985eb0e2f8d8f7497bce436e0a9f (diff)
downloadsamba-d6d9d6debdbf9bfa3fba287e0a1799e764c6b0d5.tar.gz
samba-d6d9d6debdbf9bfa3fba287e0a1799e764c6b0d5.tar.bz2
samba-d6d9d6debdbf9bfa3fba287e0a1799e764c6b0d5.zip
Update some of the DEBUG()s in Get_Pwnam_internal()
Andrew Bartlett (This used to be commit 20f6f9e3a221da60aae0de166f17085053e27286)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/username.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/source3/lib/username.c b/source3/lib/username.c
index bde44ac515..1504fd6a06 100644
--- a/source3/lib/username.c
+++ b/source3/lib/username.c
@@ -257,8 +257,8 @@ static struct passwd *Get_Pwnam_internals(const char *user, char *user2)
goto done;
/* Try as given, if username wasn't originally lowercase */
- if(strcmp(user,user2) != 0) {
- DEBUG(5,("Trying _Get_Pwnam(), username as given is %s\n",user));
+ if(strcmp(user, user2) != 0) {
+ DEBUG(5,("Trying _Get_Pwnam(), username as given is %s\n", user));
ret = sys_getpwnam(user);
if(ret)
goto done;
@@ -266,8 +266,8 @@ static struct passwd *Get_Pwnam_internals(const char *user, char *user2)
/* Try as uppercase, if username wasn't originally uppercase */
strupper(user2);
- if(strcmp(user,user2) != 0) {
- DEBUG(5,("Trying _Get_Pwnam(), username as uppercase is %s\n",user2));
+ if(strcmp(user, user2) != 0) {
+ DEBUG(5,("Trying _Get_Pwnam(), username as uppercase is %s\n", user2));
ret = sys_getpwnam(user2);
if(ret)
goto done;
@@ -275,11 +275,11 @@ static struct passwd *Get_Pwnam_internals(const char *user, char *user2)
/* Try all combinations up to usernamelevel */
strlower(user2);
- DEBUG(5,("Checking combinations of %d uppercase letters in %s\n",lp_usernamelevel(),user2));
+ DEBUG(5,("Checking combinations of %d uppercase letters in %s\n", lp_usernamelevel(), user2));
ret = uname_string_combinations(user2, sys_getpwnam, lp_usernamelevel());
done:
- DEBUG(5,("Get_Pwnam %s find a valid username!\n",ret ? "did":"didn't"));
+ DEBUG(5,("Get_Pwnam_internals %s find user [%s]!\n",ret ? "did":"didn't", user));
return ret;
}
@@ -316,10 +316,13 @@ struct passwd *Get_Pwnam(const char *user)
fstrcpy(user2, user);
+ DEBUG(5,("Finding user %s\n", user));
+
ret = Get_Pwnam_internals(user, user2);
- /* We can safely assume ret is NULL if none of the above succeed */
- return(ret);
+ DEBUG(5,("Get_Pwnam %s find user [%s]!\n",ret ? "did":"didn't", user));
+
+ return ret;
}
/****************************************************************************