summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/auth/auth_util.c8
-rw-r--r--source3/sam/idmap_ldap.c7
-rw-r--r--source3/smbd/service.c2
3 files changed, 7 insertions, 10 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index ea46d27e9e..f77ee350b4 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -784,13 +784,9 @@ NTSTATUS make_server_info_sam(auth_serversupplied_info **server_info,
return NT_STATUS_NO_SUCH_USER;
}
(*server_info)->unix_name = smb_xstrdup(pwd->pw_name);
- passwd_free(&pwd);
+ (*server_info)->gid = pwd->pw_gid;
- if (!NT_STATUS_IS_OK(nt_status = sid_to_gid(pdb_get_group_sid(sampass),
- &((*server_info)->gid)))) {
- free_server_info(server_info);
- return nt_status;
- }
+ passwd_free(&pwd);
if (!NT_STATUS_IS_OK(nt_status = add_user_groups(server_info, sampass,
(*server_info)->uid,
diff --git a/source3/sam/idmap_ldap.c b/source3/sam/idmap_ldap.c
index ade88d9220..d0010d8cd9 100644
--- a/source3/sam/idmap_ldap.c
+++ b/source3/sam/idmap_ldap.c
@@ -474,9 +474,10 @@ static NTSTATUS ldap_set_mapping_internals(const DOM_SID *sid, unid_t id,
char *ld_error = NULL;
ldap_get_option(ldap_state.smbldap_state->ldap_struct, LDAP_OPT_ERROR_STRING,
&ld_error);
- DEBUG(0,("ldap_set_mapping_internals: Failed to create mapping from %s to %u [%s]\n",
- sid_string, (unsigned int)((id_type & ID_USERID) ? id.uid : id.gid), type));
- DEBUG(0, ("ldap_set_mapping_internals: Error was: %s\n", ld_error ? ld_error : "(NULL)"));
+ DEBUG(0,("ldap_set_mapping_internals: Failed to %s mapping from %s to %u [%s]\n",
+ (ldap_op == LDAP_MOD_ADD) ? "add" : "replace",
+ sid_string, (unsigned int)((id_type & ID_USERID) ? id.uid : id.gid), type));
+ DEBUG(0, ("ldap_set_mapping_internals: Error was: %s (%s)\n", ld_error ? ld_error : "(NULL)", ldap_err2string (rc)));
return NT_STATUS_UNSUCCESSFUL;
}
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index 6a23e38bbd..63991904ff 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -359,7 +359,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser,
guest = True;
pass = getpwnam_alloc(guestname);
if (!pass) {
- DEBUG(0,("authorise_login: Invalid guest account %s??\n",guestname));
+ DEBUG(0,("make_conncection_snum: Invalid guest account %s??\n",guestname));
conn_free(conn);
*status = NT_STATUS_NO_SUCH_USER;
return NULL;