summaryrefslogtreecommitdiff
path: root/source3/passdb/passdb.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-02-22 12:01:05 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-02-22 12:01:05 +0000
commit3e19eda335057ec47483c8567395b43d316485db (patch)
treeae3b8f3197c156998cfe7e5fccec5d3719650a57 /source3/passdb/passdb.c
parentab43a25b2893506d5de305626dfbbf98966f1f78 (diff)
downloadsamba-3e19eda335057ec47483c8567395b43d316485db.tar.gz
samba-3e19eda335057ec47483c8567395b43d316485db.tar.bz2
samba-3e19eda335057ec47483c8567395b43d316485db.zip
Remove 'unixsam' from the default passdb backends.
The intention is to remove the muliple passdb backends, but we need the 'guest' account to always be there. If the admin adds the guest account to (say) LDAP, there will only be one backend required for operation. This helps remove some nasty behaviours with adding accounts to the system for both the RPC 'create user' and the SAMSYNC code. Users 'added' with an 'add user/machine' script won't magicly appear, and machine accounts 'pre-added' to unix, but not the smbpasswd file will not cause mayhem. This commit also implements somthing tridge discussed with me, the concept of 'default' passdb operation pointers - so that each backend does not need it's own stub funcitons wrapping the default tdb privilages/group mapping code. This also removes an implicit 'sid->name' and 'name->sid' mapping from our own local SID space, to winbind usernames. When adding mapping for NIS/LDAP non-sam users in future, we need to be careful. Andrew Bartlett (This used to be commit 6f32fa234961a525760a05418a08ec48d22d7617)
Diffstat (limited to 'source3/passdb/passdb.c')
-rw-r--r--source3/passdb/passdb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index 71a880d295..eff1ef4bcc 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -283,7 +283,7 @@ NTSTATUS pdb_init_sam_pw(SAM_ACCOUNT **new_sam_acct, const struct passwd *pwd)
if (!pwd) {
new_sam_acct = NULL;
- return NT_STATUS_UNSUCCESSFUL;
+ return NT_STATUS_INVALID_PARAMETER;
}
if (!NT_STATUS_IS_OK(nt_status = pdb_init_sam(new_sam_acct))) {
@@ -661,7 +661,7 @@ BOOL local_lookup_sid(DOM_SID *sid, char *name, enum SID_NAME_USE *psid_name_use
pdb_free_sam(&sam_account);
if (pdb_getgrsid(&map, *sid, MAPPING_WITHOUT_PRIV)) {
- if (map.gid!=-1) {
+ if (map.gid!=(gid_t)-1) {
DEBUG(5,("local_lookup_sid: mapped group %s to gid %u\n", map.nt_name, (unsigned int)map.gid));
} else {
DEBUG(5,("local_lookup_sid: mapped group %s to no unix gid. Returning name.\n", map.nt_name));
@@ -950,7 +950,7 @@ BOOL local_sid_to_gid(gid_t *pgid, const DOM_SID *psid, enum SID_NAME_USE *name_
if (pdb_getgrsid(&map, *psid, MAPPING_WITHOUT_PRIV)) {
/* the SID is in the mapping table but not mapped */
- if (map.gid==-1)
+ if (map.gid==(gid_t)-1)
return False;
*pgid = map.gid;