diff options
author | Simo Sorce <idra@samba.org> | 2003-04-27 12:47:41 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2003-04-27 12:47:41 +0000 |
commit | 88e41f9e20c3498fe12190da71b9c154332a7cd8 (patch) | |
tree | e6b20b2eac63832c2046142a145aabc7969ed1c3 /source3/passdb/pdb_smbpasswd.c | |
parent | e06940968abc20336e4eecc93ac2bdb1b1639855 (diff) | |
download | samba-88e41f9e20c3498fe12190da71b9c154332a7cd8.tar.gz samba-88e41f9e20c3498fe12190da71b9c154332a7cd8.tar.bz2 samba-88e41f9e20c3498fe12190da71b9c154332a7cd8.zip |
prepare to get _nua out of the door (but back in from the window ;-)
(This used to be commit 09eb02cba0747ae47aa4a76f4fac69af293a774a)
Diffstat (limited to 'source3/passdb/pdb_smbpasswd.c')
-rw-r--r-- | source3/passdb/pdb_smbpasswd.c | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c index 7f74196633..38bb61957c 100644 --- a/source3/passdb/pdb_smbpasswd.c +++ b/source3/passdb/pdb_smbpasswd.c @@ -1554,27 +1554,9 @@ NTSTATUS pdb_init_smbpasswd(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_method, (*pdb_method)->free_private_data = free_private_data; - return NT_STATUS_OK; -} - -NTSTATUS pdb_init_smbpasswd_nua(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_method, const char *location) -{ - NTSTATUS nt_status; - struct smbpasswd_privates *privates; - - if (!NT_STATUS_IS_OK(nt_status = pdb_init_smbpasswd(pdb_context, pdb_method, location))) { - return nt_status; - } - - (*pdb_method)->name = "smbpasswd_nua"; - - privates = (*pdb_method)->private_data; - - privates->permit_non_unix_accounts = True; - - if (!lp_non_unix_account_range(&privates->low_nua_userid, &privates->high_nua_userid)) { - DEBUG(0, ("cannot use smbpasswd_nua without 'non unix account range' in smb.conf!\n")); - return NT_STATUS_UNSUCCESSFUL; + if (lp_idmap_uid(&privates->low_nua_userid, &privates->high_nua_userid)) { + DEBUG(0, ("idmap uid range defined, non unix accounts enabled\n")); + privates->permit_non_unix_accounts = True; } return NT_STATUS_OK; @@ -1583,6 +1565,5 @@ NTSTATUS pdb_init_smbpasswd_nua(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_meth int pdb_smbpasswd_init(void) { smb_register_passdb("smbpasswd", pdb_init_smbpasswd, PASSDB_INTERFACE_VERSION); - smb_register_passdb("smbpasswd_nua", pdb_init_smbpasswd_nua, PASSDB_INTERFACE_VERSION); return True; } |