summaryrefslogtreecommitdiffstats
path: root/source/passdb/passdb.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-01-20 13:26:31 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-01-20 13:26:31 +0000
commit799ac01fe08a338e4e94289f5d6767ebf905c1fa (patch)
treeb74353554607f980c23fdebb6ee4d205a0a3081b /source/passdb/passdb.c
parent6d0b3d051f8f74ea6235173a89e96f5934aff4f3 (diff)
downloadsamba-799ac01fe08a338e4e94289f5d6767ebf905c1fa.tar.gz
samba-799ac01fe08a338e4e94289f5d6767ebf905c1fa.tar.xz
samba-799ac01fe08a338e4e94289f5d6767ebf905c1fa.zip
Kill off another ugly wart from the side of the passdb subsystem.
This time its the pdb_getsampwuid() function - which was only being used by the SAMR rpc subsystem to gain a 'user session key'. This 'user session key' is actually generated at login time, and the other changes here simply move that data around. This also means that (when I check some details) we will be able to use the user session key, even when we are not actually the DC, becouse its one of the components of the info3 struct returned on logon. Andrew Bartlett
Diffstat (limited to 'source/passdb/passdb.c')
-rw-r--r--source/passdb/passdb.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/source/passdb/passdb.c b/source/passdb/passdb.c
index c014c3221f7..4460af05450 100644
--- a/source/passdb/passdb.c
+++ b/source/passdb/passdb.c
@@ -1158,36 +1158,3 @@ account without a valid local system user.\n", user_name);
pdb_free_sam(&sam_pass);
return True;
}
-
-/***************************************************************************
- Search by uid. Wrapper around pdb_getsampwnam()
- **************************************************************************/
-
-BOOL pdb_getsampwuid (SAM_ACCOUNT* user, uid_t uid)
-{
- struct passwd *pw;
- fstring name;
-
- if (user==NULL) {
- DEBUG(0,("pdb_getsampwuid: SAM_ACCOUNT is NULL.\n"));
- return False;
- }
-
- /*
- * Never trust the uid in the passdb. Lookup the username first
- * and then lokup the user by name in the sam.
- */
-
- if ((pw=getpwuid_alloc(uid)) == NULL) {
- DEBUG(0,("pdb_getsampwuid: getpwuid(%d) return NULL. User does not exist in Unix accounts!\n", uid));
- return False;
- }
-
- fstrcpy (name, pw->pw_name);
-
- passwd_free(&pw);
-
- return pdb_getsampwnam (user, name);
-
-}
-