summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2000-11-13 23:03:34 +0000
committerGerald Carter <jerry@samba.org>2000-11-13 23:03:34 +0000
commit9fede0dc0dbad51528cd1384023d24549c3f0ba4 (patch)
tree0f3a045da16581462aa3dce6e7221ee12924954b /source3/param
parent8f338ee3dd5d3b68b36c021a22b624678ea116f6 (diff)
downloadsamba-9fede0dc0dbad51528cd1384023d24549c3f0ba4.tar.gz
samba-9fede0dc0dbad51528cd1384023d24549c3f0ba4.tar.bz2
samba-9fede0dc0dbad51528cd1384023d24549c3f0ba4.zip
Large commit which restructures the local password storage API.
Currently the only backend which works is smbpasswd (tdb, LDAP, and NIS+) are broken, but they were somewhat broken before. :) The following functions implement the storage manipulation interface /*The following definitions come from passdb/pdb_smbpasswd.c */ BOOL pdb_setsampwent (BOOL update); void pdb_endsampwent (void); SAM_ACCOUNT* pdb_getsampwent (void); SAM_ACCOUNT* pdb_getsampwnam (char *username); SAM_ACCOUNT* pdb_getsampwuid (uid_t uid); SAM_ACCOUNT* pdb_getsampwrid (uint32 rid); BOOL pdb_add_sam_account (SAM_ACCOUNT *sampass); BOOL pdb_update_sam_account (SAM_ACCOUNT *sampass, BOOL override); BOOL pdb_delete_sam_account (char* username); There is also a host of pdb_set..() and pdb_get..() functions for manipulating SAM_ACCOUNT struct members. Note that the struct passdb_ops {} has gone away. Also notice that struct smb_passwd (formally in smb.h) has been moved to passdb/pdb_smbpasswd.c and is not accessed outisde of static internal functions in this file. All local password searches should make use of the the SAM_ACCOUNT struct and the previously mentioned functions. I'll write some documentation for this later. The next step is to fix the TDB passdb backend, then work on spliting the backends out into share libraries, and finally get the LDAP backend going. What works and may not: o domain logons from Win9x works o domain logons from WinNT 4 works o user and group enumeration as implemented by Tim works o file and print access works o changing password from Win9x & NT ummm...i'll fix this tonight :) If I broke anything else, just yell and I'll fix it. I think it should be fairly quite. -- jerry (This used to be commit 0b92d0838ebdbe24f34f17e313ecbf61a0301389)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 43b0c62f17..dc2082423b 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -119,11 +119,12 @@ typedef struct
char *szPasswdChat;
char *szLogFile;
char *szConfigFile;
-/*#ifdef WITH_TDBPWD
+#ifdef WITH_TDBPWD
char *szTDBPasswdFile;
-#else*/
+#else
char *szSMBPasswdFile;
-/* #endif */
+#endif
+ char *szPassdbModulePath;
char *szPasswordServer;
char *szSocketOptions;
char *szValidChars;
@@ -669,6 +670,7 @@ static struct parm_struct parm_table[] = {
#else */
{"smb passwd file", P_STRING, P_GLOBAL, &Globals.szSMBPasswdFile, NULL, NULL, 0},
/* #endif */
+ {"passdb module path", P_STRING, P_GLOBAL, &Globals.szPassdbModulePath, NULL, NULL, 0},
{"root directory", P_STRING, P_GLOBAL, &Globals.szRootdir, NULL, NULL, 0},
{"root dir", P_STRING, P_GLOBAL, &Globals.szRootdir, NULL, NULL, 0},
{"root", P_STRING, P_GLOBAL, &Globals.szRootdir, NULL, NULL, 0},
@@ -1131,14 +1133,13 @@ static void init_globals(void)
DEBUG(3, ("Initialising global parameters\n"));
-/* #ifdef WITH_TDBPWD
- string_set(&Globals.szTDBPasswdFile, TDB_PASSWD_FILE);
-#else */
#ifdef WITH_TDBPWD
- string_set(&Globals.szSMBPasswdFile, TDB_PASSWD_FILE);
+ string_set(&Globals.szTDBPasswdFile, TDB_PASSWD_FILE);
#else
string_set(&Globals.szSMBPasswdFile, SMB_PASSWD_FILE);
#endif
+ string_set(&Globals.szPassdbModulePath, "");
+
/*
* Allow the default PASSWD_CHAT to be overridden in local.h.
*/
@@ -1256,7 +1257,8 @@ static void init_globals(void)
Globals.sslCompatibility = False;
#endif /* WITH_SSL */
-/* these parameters are set to defaults that are more appropriate
+/*
+ these parameters are set to defaults that are more appropriate
for the increasing samba install base:
as a member of the workgroup, that will possibly become a
@@ -1265,7 +1267,6 @@ static void init_globals(void)
doesn't provide WINS server service by default (wsupp = False),
and doesn't provide domain master browser services by default, either.
-
*/
Globals.bMsAddPrinterWizard = True;
@@ -1367,11 +1368,12 @@ static char *lp_string(const char *s)
FN_GLOBAL_STRING(lp_logfile, &Globals.szLogFile)
FN_GLOBAL_STRING(lp_smbrun, &Globals.szSmbrun)
FN_GLOBAL_STRING(lp_configfile, &Globals.szConfigFile)
-/* #ifdef WITH_TDBPWD
+#ifdef WITH_TDBPWD
FN_GLOBAL_STRING(lp_tdb_passwd_file, &Globals.szTDBPasswdFile)
-#else */
+#else
FN_GLOBAL_STRING(lp_smb_passwd_file, &Globals.szSMBPasswdFile)
-/* #endif */
+#endif
+FN_GLOBAL_STRING(lp_passdb_module_path, &Globals.szPassdbModulePath)
FN_GLOBAL_STRING(lp_serverstring, &Globals.szServerString)
FN_GLOBAL_STRING(lp_printcapname, &Globals.szPrintcapname)
FN_GLOBAL_STRING(lp_enumports_cmd, &Globals.szEnumPortsCommand)