summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-05-06 18:14:02 +0000
committerJeremy Allison <jra@samba.org>1998-05-06 18:14:02 +0000
commitb54509045d7186fc0526d91bcf429659cba8be1d (patch)
treeaaf529823ffb62ad2b350c156885ab849b38db9a /source3/passdb
parent2b4d426726cad43db6ef2889c83d898b52a2018f (diff)
downloadsamba-b54509045d7186fc0526d91bcf429659cba8be1d.tar.gz
samba-b54509045d7186fc0526d91bcf429659cba8be1d.tar.bz2
samba-b54509045d7186fc0526d91bcf429659cba8be1d.zip
loadparm.c: Added #ifdef USE_LDAP around ldap code.
server.c: Moved %U, %G and %N into standard_sub() from standard_sub_basic() as only smbd knows about usernames. Also fixes problem with calling standard_sub_basic() from loadparm.c. smbpass.c: Partial tidyup of machine_password_lock() code - not finished yet. util.c: Moved %U, %G and %N into standard_sub() from standard_sub_basic() as only smbd knows about usernames. Also fixes problem with calling standard_sub_basic() from loadparm.c. lib/rpc/server/srv_ldap_helpers.c: Added #ifdef USE_LDAP around ldap code. lib/rpc/server/srv_samr.c: Added #ifdef USE_LDAP around ldap code. Jeremy. (This used to be commit 446b98ca071170fc950bad86ad96b58308a5b75c)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/smbpass.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/source3/passdb/smbpass.c b/source3/passdb/smbpass.c
index cb3a4a9a99..2fc0c3fb89 100644
--- a/source3/passdb/smbpass.c
+++ b/source3/passdb/smbpass.c
@@ -556,7 +556,7 @@ struct smb_passwd *getsmbpwnam(char *name)
{
#ifdef USE_LDAP
return ldap_get_smbpwd_entry(name, 0);
-#else
+#else /* USE_LDAP */
return get_smbpwd_entry(name, 0);
#endif /* USE_LDAP */
}
@@ -569,7 +569,7 @@ struct smb_passwd *getsmbpwuid(unsigned int uid)
{
#ifdef USE_LDAP
return ldap_get_smbpwd_entry(NULL, uid);
-#else
+#else /* USE_DLAP */
return get_smbpwd_entry(NULL, uid);
#endif /* USE_LDAP */
}
@@ -1141,14 +1141,15 @@ void *machine_password_lock( char *domain, char *name, BOOL update)
}
chmod(mac_file, 0600);
- }
- if(!pw_file_lock(fileno(fp), (update ? F_WRLCK : F_RDLCK),
+ if(!pw_file_lock(fileno(fp), (update ? F_WRLCK : F_RDLCK),
60, &mach_passwd_lock_depth))
- {
- DEBUG(0,("machine_password_lock: cannot lock file %s\n", mac_file));
- fclose(fp);
- return NULL;
+ {
+ DEBUG(0,("machine_password_lock: cannot lock file %s\n", mac_file));
+ fclose(fp);
+ return NULL;
+ }
+
}
return (void *)fp;