summaryrefslogtreecommitdiff
path: root/source3/smbd/password.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-04-11 13:55:53 +0000
committerAndrew Tridgell <tridge@samba.org>2000-04-11 13:55:53 +0000
commit2fa922611bf7160e2c1ce80c11b50006448bf98d (patch)
treeed29a6f6c0364ee631b049b26031139b9e74a4ec /source3/smbd/password.c
parent03630a9aa9ce5c00619ad3c4bb498d95054ae03a (diff)
downloadsamba-2fa922611bf7160e2c1ce80c11b50006448bf98d.tar.gz
samba-2fa922611bf7160e2c1ce80c11b50006448bf98d.tar.bz2
samba-2fa922611bf7160e2c1ce80c11b50006448bf98d.zip
finally got sick of the "extern int Client" code and the stupid
assumption that we have one socket everywhere while doing so I discovered a few bugs! 1) the clientgen session retarget code if used from smbd or nmbd would cause a crash as it called close_sockets() which closed our main socket! fixed by removing close_sockets() completely - it is unnecessary 2) the caching in client_addr() and client_name() was bogus - it could easily get fooled and give the wrong result. fixed. 3) the retarget could could recurse, allowing an easy denial of service attack on nmbd. fixed. (This used to be commit 5937ab14d222696e40a3fc6f0e6a536f2d7305d3)
Diffstat (limited to 'source3/smbd/password.c')
-rw-r--r--source3/smbd/password.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index bdb0385a48..208dbd2bff 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -943,8 +943,7 @@ BOOL check_hosts_equiv(char *user)
/* note: don't allow hosts.equiv on root */
if (fname && *fname && (pass->pw_uid != 0)) {
- extern int Client;
- if (check_user_equiv(user,client_name(Client),fname))
+ if (check_user_equiv(user,client_name(),fname))
return(True);
}
@@ -952,9 +951,8 @@ BOOL check_hosts_equiv(char *user)
{
char *home = get_user_home_dir(user);
if (home) {
- extern int Client;
slprintf(rhostsfile, sizeof(rhostsfile)-1, "%s/.rhosts", home);
- if (check_user_equiv(user,client_name(Client),rhostsfile))
+ if (check_user_equiv(user,client_name(),rhostsfile))
return(True);
}
}