diff options
author | Gerald Carter <jerry@samba.org> | 2004-08-19 13:07:49 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2004-08-19 13:07:49 +0000 |
commit | 4e7585c7a062c44078f509bc37a0801723169ea4 (patch) | |
tree | 0593d2734ee264c093ce340e13721013e4433fb5 /source | |
parent | 728d44296a683e1d3ddc819a781a603f4dde9825 (diff) | |
download | samba-4e7585c7a062c44078f509bc37a0801723169ea4.tar.gz samba-4e7585c7a062c44078f509bc37a0801723169ea4.tar.xz samba-4e7585c7a062c44078f509bc37a0801723169ea4.zip |
r1918: revert the passdb.c change; fix typos in release notes; add guenther's fix for pam_winbind
Diffstat (limited to 'source')
-rw-r--r-- | source/nsswitch/winbindd_pam.c | 2 | ||||
-rw-r--r-- | source/passdb/passdb.c | 26 |
2 files changed, 8 insertions, 20 deletions
diff --git a/source/nsswitch/winbindd_pam.c b/source/nsswitch/winbindd_pam.c index 81d4e69ccd6..03947de8750 100644 --- a/source/nsswitch/winbindd_pam.c +++ b/source/nsswitch/winbindd_pam.c @@ -123,7 +123,7 @@ static NTSTATUS check_info3_in_group(TALLOC_CTX *mem_ctx, http://www.microsoft.com/windows2000/techinfo/administration/security/sidfilter.asp */ - for (i = 0; i < info3->num_other_sids; j++) { + for (i = 0; i < info3->num_other_sids; i++) { sid_copy(&all_sids[info3->num_groups2 + i + 2], &info3->other_sids[j].sid); j++; diff --git a/source/passdb/passdb.c b/source/passdb/passdb.c index 14c8c67aa3c..743978919b6 100644 --- a/source/passdb/passdb.c +++ b/source/passdb/passdb.c @@ -190,9 +190,7 @@ static NTSTATUS pdb_set_sam_sids(SAM_ACCOUNT *account_data, const struct passwd const char *guest_account = lp_guestaccount(); GROUP_MAP map; BOOL ret; - DOM_SID user_sid; - DOM_SID group_sid; - + if (!account_data || !pwd) { return NT_STATUS_INVALID_PARAMETER; } @@ -200,7 +198,7 @@ static NTSTATUS pdb_set_sam_sids(SAM_ACCOUNT *account_data, const struct passwd /* this is a hack this thing should not be set this way --SSS */ if (!(guest_account && *guest_account)) { - DEBUG(1, ("pdb_set_sam_sids: NULL guest account!?!?\n")); + DEBUG(1, ("NULL guest account!?!?\n")); return NT_STATUS_UNSUCCESSFUL; } else { /* Ensure this *must* be set right */ @@ -215,13 +213,8 @@ static NTSTATUS pdb_set_sam_sids(SAM_ACCOUNT *account_data, const struct passwd } } - if (NT_STATUS_IS_OK(uid_to_sid(&user_sid, pwd->pw_uid))) { - if (!pdb_set_user_sid(account_data, &user_sid, PDB_SET)) { - DEBUG(0,("pdb_set_sam_sids: Can't set User SID from mapped UID\n")); - return NT_STATUS_INVALID_PARAMETER; - } - } else if (!pdb_set_user_sid_from_rid(account_data, algorithmic_pdb_uid_to_user_rid(pwd->pw_uid), PDB_SET)) { - DEBUG(0,("pdb_set_sam_sids: Can't set User SID from RID!\n")); + if (!pdb_set_user_sid_from_rid(account_data, algorithmic_pdb_uid_to_user_rid(pwd->pw_uid), PDB_SET)) { + DEBUG(0,("Can't set User SID from RID!\n")); return NT_STATUS_INVALID_PARAMETER; } @@ -232,18 +225,13 @@ static NTSTATUS pdb_set_sam_sids(SAM_ACCOUNT *account_data, const struct passwd if( ret ) { if (!pdb_set_group_sid(account_data, &map.sid, PDB_SET)){ - DEBUG(0,("pdb_set_sam_sids: Can't set Group SID!\n")); + DEBUG(0,("Can't set Group SID!\n")); return NT_STATUS_INVALID_PARAMETER; } } else { - if (NT_STATUS_IS_OK(gid_to_sid(&group_sid, pwd->pw_gid))) { - if (!pdb_set_group_sid(account_data, &group_sid, PDB_SET)) { - DEBUG(0,("pdb_set_sam_sids: Can't set Group SID from mapped GID\n")); - return NT_STATUS_INVALID_PARAMETER; - } - } else if (!pdb_set_group_sid_from_rid(account_data, pdb_gid_to_group_rid(pwd->pw_gid), PDB_SET)) { - DEBUG(0,("pdb_set_sam_sids: Can't set Group SID\n")); + if (!pdb_set_group_sid_from_rid(account_data, pdb_gid_to_group_rid(pwd->pw_gid), PDB_SET)) { + DEBUG(0,("Can't set Group SID\n")); return NT_STATUS_INVALID_PARAMETER; } } |