summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd_user.c
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-02-01 23:59:53 -0800
committerTim Prouty <tprouty@samba.org>2009-02-02 00:03:09 -0800
commit10e9e95ce8bb94c6a2547dd1148cd20a171b3583 (patch)
tree5dfeae89d483495dccc5f9525d234228e88f611a /source3/winbindd/winbindd_user.c
parentd96248a9b46559552f53b0ecd3861387ea7ff050 (diff)
downloadsamba-10e9e95ce8bb94c6a2547dd1148cd20a171b3583.tar.gz
samba-10e9e95ce8bb94c6a2547dd1148cd20a171b3583.tar.bz2
samba-10e9e95ce8bb94c6a2547dd1148cd20a171b3583.zip
s3 build: Fix "assignment discards qualifiers from pointer target type" warnings
Diffstat (limited to 'source3/winbindd/winbindd_user.c')
-rw-r--r--source3/winbindd/winbindd_user.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source3/winbindd/winbindd_user.c b/source3/winbindd/winbindd_user.c
index b01e1847f2..62fd4d7f07 100644
--- a/source3/winbindd/winbindd_user.c
+++ b/source3/winbindd/winbindd_user.c
@@ -76,7 +76,6 @@ static bool winbindd_fill_pwent(TALLOC_CTX *ctx, char *dom_name, char *user_name
char *mapped_name = NULL;
struct winbindd_domain *domain = NULL;
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
- char *dom_name_idmap = "";
if (!pw || !dom_name || !user_name)
return False;
@@ -88,13 +87,10 @@ static bool winbindd_fill_pwent(TALLOC_CTX *ctx, char *dom_name, char *user_name
nt_status = NT_STATUS_NO_SUCH_DOMAIN;
}
- if (domain->have_idmap_config) {
- dom_name_idmap = dom_name;
- }
-
/* Resolve the uid number */
- if (!NT_STATUS_IS_OK(idmap_sid_to_uid(dom_name_idmap, user_sid,
+ if (!NT_STATUS_IS_OK(idmap_sid_to_uid(domain->have_idmap_config ?
+ dom_name : "", user_sid,
&pw->pw_uid))) {
DEBUG(1, ("error getting user id for sid %s\n",
sid_string_dbg(user_sid)));
@@ -103,7 +99,8 @@ static bool winbindd_fill_pwent(TALLOC_CTX *ctx, char *dom_name, char *user_name
/* Resolve the gid number */
- if (!NT_STATUS_IS_OK(idmap_sid_to_gid(dom_name_idmap, group_sid,
+ if (!NT_STATUS_IS_OK(idmap_sid_to_gid(domain->have_idmap_config ?
+ dom_name : "", group_sid,
&pw->pw_gid))) {
DEBUG(1, ("error getting group id for sid %s\n",
sid_string_dbg(group_sid)));