summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-10-29 07:28:32 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-10-29 07:28:32 +0000
commit2038649e51f48a489aeec49947e1b791f0b3df43 (patch)
treeb3df7e09c5d563306f9a1b359a4b2579829b1a01 /source3/auth
parent0db1899256517507fb5a441bd75725e3fcecc2e8 (diff)
downloadsamba-2038649e51f48a489aeec49947e1b791f0b3df43.tar.gz
samba-2038649e51f48a489aeec49947e1b791f0b3df43.tar.bz2
samba-2038649e51f48a489aeec49947e1b791f0b3df43.zip
This commit is number 3 of 4.
In particular this commit focuses on: Changing the Get_Pwnam code so that it can work in a const-enforced environment. While these changes have been mildly tested, and are pretty small, any assistance in this is appreciated. ---- These changes allow for 'const' in the Samba tree. There are a number of good reasons to do this: - I want to allow the SAM_ACCOUNT structure to move from wasteful pstrings and fstrings to allocated strings. We can't do that if people are modifying these outputs, as they may well make assumptions about getting pstrings and fstrings - I want --with-pam_smbpass to compile with a slightly sane volume of warnings, currently its pretty bad, even in 2.2 where is compiles at all. - Tridge assures me that he no longer opposes 'const religion' based on the ability to #define const the problem away. - Changed Get_Pwnam(x,y) into two variants (so that the const parameter can work correctly): - Get_Pwnam(const x) and Get_Pwnam_Modify(x). - Reworked smbd/chgpasswd.c to work with these mods, passing around a 'struct passwd' rather than the modified username (This used to be commit e7634f81c5116ff4addfb7e495f54b6bb78e8f77)
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_rhosts.c4
-rw-r--r--source3/auth/auth_unix.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/source3/auth/auth_rhosts.c b/source3/auth/auth_rhosts.c
index d6ca01936f..9f5f1e10e5 100644
--- a/source3/auth/auth_rhosts.c
+++ b/source3/auth/auth_rhosts.c
@@ -86,7 +86,7 @@ static BOOL check_user_equiv(const char *user, const char *remote, const char *e
static char *mydomain = NULL;
if (!mydomain)
yp_get_default_domain(&mydomain);
- if (mydomain && innetgr(file_host,(char *)remote,(char *)user,mydomain))
+ if (mydomain && innetgr(file_host,remote,user,mydomain))
host_ok = True;
}
#else
@@ -135,7 +135,7 @@ static BOOL check_hosts_equiv(char *user) /* should be const... */
{
char *fname = NULL;
pstring rhostsfile;
- struct passwd *pass = Get_Pwnam(user,False);
+ struct passwd *pass = Get_Pwnam(user);
if (!pass)
return(False);
diff --git a/source3/auth/auth_unix.c b/source3/auth/auth_unix.c
index 2f9034e3e5..29a2a6eafb 100644
--- a/source3/auth/auth_unix.c
+++ b/source3/auth/auth_unix.c
@@ -89,7 +89,7 @@ NTSTATUS check_unix_security(const auth_usersupplied_info *user_info, auth_serve
become_root();
- pass = Get_Pwnam(user_info->unix_username.str, False);
+ pass = Get_Pwnam(user_info->unix_username.str);
nt_status = pass_check(pass,
pass ? pass->pw_name : user_info->unix_username.str,