summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_util.c10
-rw-r--r--source3/groupdb/mapping.c6
-rw-r--r--source3/modules/vfs_solarisacl.c14
-rw-r--r--source3/passdb/lookup_sid.c4
-rw-r--r--source3/passdb/pdb_interface.c2
-rw-r--r--source3/passdb/pdb_ldap.c14
-rw-r--r--source3/rpc_server/srv_samr_nt.c4
-rw-r--r--source3/rpcclient/cmd_spoolss.c7
-rw-r--r--source3/torture/cmd_vfs.c8
-rw-r--r--source3/utils/net_groupmap.c2
-rw-r--r--source3/utils/net_rpc.c4
-rw-r--r--source3/utils/net_sam.c14
-rw-r--r--source3/utils/status.c4
-rw-r--r--source3/winbindd/idmap_util.c6
-rw-r--r--source3/winbindd/winbindd_cache.c2
-rw-r--r--source3/winbindd/winbindd_ccache_access.c11
-rw-r--r--source3/winbindd/winbindd_idmap.c4
-rw-r--r--source3/winbindd/winbindd_pam.c2
18 files changed, 61 insertions, 57 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index c0d23474cd..bdefb71d3a 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -777,7 +777,7 @@ NTSTATUS create_local_token(auth_serversupplied_info *server_info)
if (!uid_to_unix_users_sid(server_info->utok.uid, &tmp_sid)) {
DEBUG(1,("create_local_token: Failed to create SID "
- "for uid %d!\n", server_info->utok.uid));
+ "for uid %u!\n", (unsigned int)server_info->utok.uid));
}
add_sid_to_array_unique(server_info->ptok, &tmp_sid,
&server_info->ptok->user_sids,
@@ -786,7 +786,7 @@ NTSTATUS create_local_token(auth_serversupplied_info *server_info)
for ( i=0; i<server_info->utok.ngroups; i++ ) {
if (!gid_to_unix_groups_sid( server_info->utok.groups[i], &tmp_sid ) ) {
DEBUG(1,("create_local_token: Failed to create SID "
- "for gid %d!\n", server_info->utok.groups[i]));
+ "for gid %u!\n", (unsigned int)server_info->utok.groups[i]));
continue;
}
add_sid_to_array_unique(server_info->ptok, &tmp_sid,
@@ -954,8 +954,8 @@ NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username,
pass = getpwuid_alloc(tmp_ctx, *uid);
if (pass == NULL) {
- DEBUG(1, ("getpwuid(%d) for user %s failed\n",
- *uid, username));
+ DEBUG(1, ("getpwuid(%u) for user %s failed\n",
+ (unsigned int)*uid, username));
goto done;
}
@@ -1049,7 +1049,7 @@ NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username,
if ( !gid_to_unix_groups_sid( gids[i], &unix_group_sid ) ) {
DEBUG(1,("create_token_from_username: Failed to create SID "
- "for gid %d!\n", gids[i]));
+ "for gid %u!\n", (unsigned int)gids[i]));
continue;
}
result = add_sid_to_array_unique(tmp_ctx, &unix_group_sid,
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c
index b952cda523..4f05d732f1 100644
--- a/source3/groupdb/mapping.c
+++ b/source3/groupdb/mapping.c
@@ -516,8 +516,8 @@ NTSTATUS pdb_default_create_alias(struct pdb_methods *methods,
return NT_STATUS_ACCESS_DENIED;
}
- DEBUG(10, ("Creating alias %s with gid %d and rid %d\n",
- name, gid, new_rid));
+ DEBUG(10, ("Creating alias %s with gid %u and rid %u\n",
+ name, (unsigned int)gid, (unsigned int)new_rid));
sid_copy(&sid, get_global_sam_sid());
sid_append_rid(&sid, new_rid);
@@ -787,7 +787,7 @@ NTSTATUS pdb_create_builtin_alias(uint32 rid)
return NT_STATUS_ACCESS_DENIED;
}
- DEBUG(10,("Creating alias %s with gid %d\n", groupname, gid));
+ DEBUG(10,("Creating alias %s with gid %u\n", groupname, (unsigned int)gid));
map.gid = gid;
sid_copy(&map.sid, &sid);
diff --git a/source3/modules/vfs_solarisacl.c b/source3/modules/vfs_solarisacl.c
index cafb077555..fbfe664c6e 100644
--- a/source3/modules/vfs_solarisacl.c
+++ b/source3/modules/vfs_solarisacl.c
@@ -367,13 +367,13 @@ static bool smb_acl_to_solaris_acl(SMB_ACL_T smb_acl,
}
switch(solaris_entry.a_type) {
case USER:
- DEBUG(10, ("got tag type USER with uid %d\n",
- smb_entry->uid));
+ DEBUG(10, ("got tag type USER with uid %u\n",
+ (unsigned int)smb_entry->uid));
solaris_entry.a_id = (uid_t)smb_entry->uid;
break;
case GROUP:
- DEBUG(10, ("got tag type GROUP with gid %d\n",
- smb_entry->gid));
+ DEBUG(10, ("got tag type GROUP with gid %u\n",
+ (unsigned int)smb_entry->gid));
solaris_entry.a_id = (uid_t)smb_entry->gid;
break;
default:
@@ -388,7 +388,7 @@ static bool smb_acl_to_solaris_acl(SMB_ACL_T smb_acl,
smb_perm_to_solaris_perm(smb_entry->a_perm);
DEBUG(10, ("assembled the following solaris ace:\n"));
DEBUGADD(10, (" - type: 0x%04x\n", solaris_entry.a_type));
- DEBUGADD(10, (" - id: %d\n", solaris_entry.a_id));
+ DEBUGADD(10, (" - id: %u\n", (unsigned int)solaris_entry.a_id));
DEBUGADD(10, (" - perm: o%o\n", solaris_entry.a_perm));
if (!solaris_add_to_acl(solaris_acl, count, &solaris_entry,
1, type))
@@ -400,8 +400,8 @@ static bool smb_acl_to_solaris_acl(SMB_ACL_T smb_acl,
DEBUG(10, ("test, if entry has been copied into acl:\n"));
DEBUGADD(10, (" - type: 0x%04x\n",
(*solaris_acl)[(*count)-1].a_type));
- DEBUGADD(10, (" - id: %d\n",
- (*solaris_acl)[(*count)-1].a_id));
+ DEBUGADD(10, (" - id: %u\n",
+ (unsigned int)(*solaris_acl)[(*count)-1].a_id));
DEBUGADD(10, (" - perm: o%o\n",
(*solaris_acl)[(*count)-1].a_perm));
}
diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c
index a5c2d50366..c1249f5eb4 100644
--- a/source3/passdb/lookup_sid.c
+++ b/source3/passdb/lookup_sid.c
@@ -1319,7 +1319,7 @@ void uid_to_sid(DOM_SID *psid, uid_t uid)
* the next time we ask.
*/
DEBUG(5, ("uid_to_sid: winbind failed to find a sid "
- "for uid %u\n", uid));
+ "for uid %u\n", (unsigned int)uid));
legacy_uid_to_sid(psid, uid);
return;
@@ -1372,7 +1372,7 @@ void gid_to_sid(DOM_SID *psid, gid_t gid)
* the next time we ask.
*/
DEBUG(5, ("gid_to_sid: winbind failed to find a sid "
- "for gid %u\n", gid));
+ "for gid %u\n", (unsigned int)gid));
legacy_gid_to_sid(psid, gid);
return;
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index 1909bd0da4..340867a5a6 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -1210,7 +1210,7 @@ static bool pdb_default_uid_to_sid(struct pdb_methods *methods, uid_t uid,
if (!ret) {
DEBUG(5, ("pdb_default_uid_to_rid: Did not find user "
- "%s (%d)\n", unix_pw->pw_name, uid));
+ "%s (%u)\n", unix_pw->pw_name, (unsigned int)uid));
TALLOC_FREE(sampw);
return False;
}
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 01b2eeced7..2d3b91f184 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -2859,8 +2859,8 @@ static NTSTATUS ldapsam_enum_group_memberships(struct pdb_methods *methods,
}
filter = talloc_asprintf(mem_ctx,
- "(&(objectClass=%s)(|(memberUid=%s)(gidNumber=%d)))",
- LDAP_OBJ_POSIXGROUP, escape_name, primary_gid);
+ "(&(objectClass=%s)(|(memberUid=%s)(gidNumber=%u)))",
+ LDAP_OBJ_POSIXGROUP, escape_name, (unsigned int)primary_gid);
if (filter == NULL) {
ret = NT_STATUS_NO_MEMORY;
goto done;
@@ -2969,7 +2969,7 @@ static NTSTATUS ldapsam_map_posixgroup(TALLOC_CTX *mem_ctx,
filter = talloc_asprintf(mem_ctx,
"(&(objectClass=%s)(gidNumber=%u))",
- LDAP_OBJ_POSIXGROUP, map->gid);
+ LDAP_OBJ_POSIXGROUP, (unsigned int)map->gid);
if (filter == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -3092,8 +3092,8 @@ static NTSTATUS ldapsam_add_group_mapping_entry(struct pdb_methods *methods,
}
if (pdb_gid_to_sid(map->gid, &sid)) {
- DEBUG(3, ("Gid %d is already mapped to SID %s, refusing to "
- "add\n", map->gid, sid_string_dbg(&sid)));
+ DEBUG(3, ("Gid %u is already mapped to SID %s, refusing to "
+ "add\n", (unsigned int)map->gid, sid_string_dbg(&sid)));
result = NT_STATUS_GROUP_EXISTS;
goto done;
}
@@ -3124,7 +3124,7 @@ static NTSTATUS ldapsam_add_group_mapping_entry(struct pdb_methods *methods,
smbldap_make_mod(ldap_state->smbldap_state->ldap_struct, NULL, &mods, "description",
map->comment);
smbldap_make_mod(ldap_state->smbldap_state->ldap_struct, NULL, &mods, "gidNumber",
- talloc_asprintf(mem_ctx, "%u", map->gid));
+ talloc_asprintf(mem_ctx, "%u", (unsigned int)map->gid));
talloc_autofree_ldapmod(mem_ctx, mods);
rc = smbldap_add(ldap_state->smbldap_state, dn, mods);
@@ -3170,7 +3170,7 @@ static NTSTATUS ldapsam_update_group_mapping_entry(struct pdb_methods *methods,
"(sambaGroupType=%d))",
LDAP_OBJ_GROUPMAP,
sid_string_talloc(mem_ctx, &map->sid),
- map->gid, map->sid_name_use);
+ (unsigned int)map->gid, map->sid_name_use);
if (filter == NULL) {
result = NT_STATUS_NO_MEMORY;
goto done;
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index e0c785d841..dea1a8f2b1 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -5625,8 +5625,8 @@ NTSTATUS _samr_CreateDomAlias(pipes_struct *p,
/* check if the group has been successfully created */
if ( getgrgid(gid) == NULL ) {
- DEBUG(10, ("getgrgid(%d) of just created alias failed\n",
- gid));
+ DEBUG(10, ("getgrgid(%u) of just created alias failed\n",
+ (unsigned int)gid));
return NT_STATUS_ACCESS_DENIED;
}
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 124913edb2..5ea812c1f5 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -1107,7 +1107,7 @@ static void display_print_driver6(struct spoolss_DriverInfo6 *r)
}
printf("\tDriver Date: [%s]\n", nt_time_string(talloc_tos(), r->driver_date));
- printf("\tDriver Version: [0x%016llx]\n", r->driver_version);
+ printf("\tDriver Version: [0x%016llx]\n", (long long unsigned int)r->driver_version);
printf("\tManufacturer Name: [%s]\n", r->manufacturer_name);
printf("\tManufacturer Url: [%s]\n", r->manufacturer_url);
printf("\tHardware ID: [%s]\n", r->hardware_id);
@@ -1147,7 +1147,7 @@ static void display_print_driver8(struct spoolss_DriverInfo8 *r)
}
printf("\tDriver Date: [%s]\n", nt_time_string(talloc_tos(), r->driver_date));
- printf("\tDriver Version: [0x%016llx]\n", r->driver_version);
+ printf("\tDriver Version: [0x%016llx]\n", (long long unsigned int)r->driver_version);
printf("\tManufacturer Name: [%s]\n", r->manufacturer_name);
printf("\tManufacturer Url: [%s]\n", r->manufacturer_url);
printf("\tHardware ID: [%s]\n", r->hardware_id);
@@ -1163,7 +1163,8 @@ static void display_print_driver8(struct spoolss_DriverInfo8 *r)
printf("\tCore Driver Dependencies: [%s]\n", r->core_driver_dependencies[i]);
}
printf("\tMin Driver Inbox Driver Version Date: [%s]\n", nt_time_string(talloc_tos(), r->min_inbox_driver_ver_date));
- printf("\tMin Driver Inbox Driver Version Version: [0x%016llx]\n", r->min_inbox_driver_ver_version);
+ printf("\tMin Driver Inbox Driver Version Version: [0x%016llx]\n",
+ (long long unsigned int)r->min_inbox_driver_ver_version);
printf("\n");
}
diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c
index 17769b10b2..80ee3ec0e8 100644
--- a/source3/torture/cmd_vfs.c
+++ b/source3/torture/cmd_vfs.c
@@ -175,7 +175,7 @@ static NTSTATUS cmd_readdir(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc
printf(" Device: 0x%10x", (unsigned int)st.st_dev);
printf(" Inode: %10u", (unsigned int)st.st_ino);
printf(" Links: %10u\n", (unsigned int)st.st_nlink);
- printf(" Access: %05o", (st.st_mode) & 007777);
+ printf(" Access: %05o", (int)((st.st_mode) & 007777));
printf(" Uid: %5lu Gid: %5lu\n",
(unsigned long)st.st_uid,
(unsigned long)st.st_gid);
@@ -578,7 +578,7 @@ static NTSTATUS cmd_stat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, c
printf(" Device: 0x%10x", (unsigned int)st.st_dev);
printf(" Inode: %10u", (unsigned int)st.st_ino);
printf(" Links: %10u\n", (unsigned int)st.st_nlink);
- printf(" Access: %05o", (st.st_mode) & 007777);
+ printf(" Access: %05o", (int)((st.st_mode) & 007777));
printf(" Uid: %5lu/%.16s Gid: %5lu/%.16s\n", (unsigned long)st.st_uid, user,
(unsigned long)st.st_gid, group);
printf(" Access: %s", ctime(&(st.st_atime)));
@@ -644,7 +644,7 @@ static NTSTATUS cmd_fstat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc,
printf(" Device: 0x%10x", (unsigned int)st.st_dev);
printf(" Inode: %10u", (unsigned int)st.st_ino);
printf(" Links: %10u\n", (unsigned int)st.st_nlink);
- printf(" Access: %05o", (st.st_mode) & 007777);
+ printf(" Access: %05o", (int)((st.st_mode) & 007777));
printf(" Uid: %5lu/%.16s Gid: %5lu/%.16s\n", (unsigned long)st.st_uid, user,
(unsigned long)st.st_gid, group);
printf(" Access: %s", ctime(&(st.st_atime)));
@@ -698,7 +698,7 @@ static NTSTATUS cmd_lstat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc,
printf(" Device: 0x%10x", (unsigned int)st.st_dev);
printf(" Inode: %10u", (unsigned int)st.st_ino);
printf(" Links: %10u\n", (unsigned int)st.st_nlink);
- printf(" Access: %05o", (st.st_mode) & 007777);
+ printf(" Access: %05o", (int)((st.st_mode) & 007777));
printf(" Uid: %5lu/%.16s Gid: %5lu/%.16s\n", (unsigned long)st.st_uid, user,
(unsigned long)st.st_gid, group);
printf(" Access: %s", ctime(&(st.st_atime)));
diff --git a/source3/utils/net_groupmap.c b/source3/utils/net_groupmap.c
index 0a3a2972e4..061ffea029 100644
--- a/source3/utils/net_groupmap.c
+++ b/source3/utils/net_groupmap.c
@@ -61,7 +61,7 @@ static void print_map_entry ( GROUP_MAP map, bool long_list )
else {
d_printf("%s\n", map.nt_name);
d_printf("\tSID : %s\n", sid_string_tos(&map.sid));
- d_printf("\tUnix gid : %d\n", map.gid);
+ d_printf("\tUnix gid : %u\n", (unsigned int)map.gid);
d_printf("\tUnix group: %s\n", gidtoname(map.gid));
d_printf("\tGroup type: %s\n",
sid_type_lookup(map.sid_name_use));
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 9f4470b60d..4de4bef837 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -4088,8 +4088,8 @@ static bool get_user_sids(const char *domain, const char *user, NT_USER_TOKEN *t
wbc_status = wbcGidToSid(gid, &wsid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- DEBUG(1, ("winbind could not find SID of gid %d: %s\n",
- gid, wbcErrorString(wbc_status)));
+ DEBUG(1, ("winbind could not find SID of gid %u: %s\n",
+ (unsigned int)gid, wbcErrorString(wbc_status)));
wbcFreeMemory(groups);
return false;
}
diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c
index eea22c0dc2..6b3f5e5721 100644
--- a/source3/utils/net_sam.c
+++ b/source3/utils/net_sam.c
@@ -1490,7 +1490,7 @@ static int net_sam_provision(struct net_context *c, int argc, const char **argv)
uname = talloc_strdup(tc, "domusers");
wname = talloc_strdup(tc, "Domain Users");
dn = talloc_asprintf(tc, "cn=%s,%s", "domusers", lp_ldap_group_suffix());
- gidstr = talloc_asprintf(tc, "%d", domusers_gid);
+ gidstr = talloc_asprintf(tc, "%u", (unsigned int)domusers_gid);
gtype = talloc_asprintf(tc, "%d", SID_NAME_DOM_GRP);
if (!uname || !wname || !dn || !gidstr || !gtype) {
@@ -1545,7 +1545,7 @@ domu_done:
uname = talloc_strdup(tc, "domadmins");
wname = talloc_strdup(tc, "Domain Admins");
dn = talloc_asprintf(tc, "cn=%s,%s", "domadmins", lp_ldap_group_suffix());
- gidstr = talloc_asprintf(tc, "%d", domadmins_gid);
+ gidstr = talloc_asprintf(tc, "%u", (unsigned int)domadmins_gid);
gtype = talloc_asprintf(tc, "%d", SID_NAME_DOM_GRP);
if (!uname || !wname || !dn || !gidstr || !gtype) {
@@ -1608,8 +1608,8 @@ doma_done:
}
name = talloc_strdup(tc, "Administrator");
dn = talloc_asprintf(tc, "uid=Administrator,%s", lp_ldap_user_suffix());
- uidstr = talloc_asprintf(tc, "%d", uid);
- gidstr = talloc_asprintf(tc, "%d", domadmins_gid);
+ uidstr = talloc_asprintf(tc, "%u", (unsigned int)uid);
+ gidstr = talloc_asprintf(tc, "%u", (unsigned int)domadmins_gid);
dir = talloc_sub_specified(tc, lp_template_homedir(),
"Administrator",
get_global_sam_name(),
@@ -1699,8 +1699,8 @@ doma_done:
sid_compose(&sid, get_global_sam_sid(), DOMAIN_USER_RID_GUEST);
dn = talloc_asprintf(tc, "uid=%s,%s", pwd->pw_name, lp_ldap_user_suffix ());
- uidstr = talloc_asprintf(tc, "%d", pwd->pw_uid);
- gidstr = talloc_asprintf(tc, "%d", pwd->pw_gid);
+ uidstr = talloc_asprintf(tc, "%u", (unsigned int)pwd->pw_uid);
+ gidstr = talloc_asprintf(tc, "%u", (unsigned int)pwd->pw_gid);
if (!dn || !uidstr || !gidstr) {
d_fprintf(stderr, "Out of Memory!\n");
goto failed;
@@ -1765,7 +1765,7 @@ doma_done:
uname = talloc_strdup(tc, "domguests");
wname = talloc_strdup(tc, "Domain Guests");
dn = talloc_asprintf(tc, "cn=%s,%s", "domguests", lp_ldap_group_suffix());
- gidstr = talloc_asprintf(tc, "%d", pwd->pw_gid);
+ gidstr = talloc_asprintf(tc, "%u", (unsigned int)pwd->pw_gid);
gtype = talloc_asprintf(tc, "%d", SID_NAME_DOM_GRP);
if (!uname || !wname || !dn || !gidstr || !gtype) {
diff --git a/source3/utils/status.c b/source3/utils/status.c
index 831bdcca18..cbf0dcb2b5 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -258,8 +258,8 @@ static int traverse_sessionid(struct db_record *db, void *state)
Ucrit_addPid( sessionid.pid );
- fstr_sprintf(uid_str, "%d", sessionid.uid);
- fstr_sprintf(gid_str, "%d", sessionid.gid);
+ fstr_sprintf(uid_str, "%u", (unsigned int)sessionid.uid);
+ fstr_sprintf(gid_str, "%u", (unsigned int)sessionid.gid);
d_printf("%-7s %-12s %-12s %-12s (%s)\n",
procid_str_static(&sessionid.pid),
diff --git a/source3/winbindd/idmap_util.c b/source3/winbindd/idmap_util.c
index ad4a7ddd99..7d261a611e 100644
--- a/source3/winbindd/idmap_util.c
+++ b/source3/winbindd/idmap_util.c
@@ -40,7 +40,8 @@ NTSTATUS idmap_uid_to_sid(const char *domname, DOM_SID *sid, uid_t uid)
if (winbindd_use_idmap_cache()
&& idmap_cache_find_uid2sid(uid, sid, &expired)) {
- DEBUG(10, ("idmap_cache_find_uid2sid found %d%s\n", uid,
+ DEBUG(10, ("idmap_cache_find_uid2sid found %u%s\n",
+ (unsigned int)uid,
expired ? " (expired)": ""));
if (expired && idmap_is_online()) {
DEBUG(10, ("revalidating expired entry\n"));
@@ -98,7 +99,8 @@ NTSTATUS idmap_gid_to_sid(const char *domname, DOM_SID *sid, gid_t gid)
if (winbindd_use_idmap_cache()
&& idmap_cache_find_gid2sid(gid, sid, &expired)) {
- DEBUG(10, ("idmap_cache_find_gid2sid found %d%s\n", gid,
+ DEBUG(10, ("idmap_cache_find_gid2sid found %u%s\n",
+ (unsigned int)gid,
expired ? " (expired)": ""));
if (expired && idmap_is_online()) {
DEBUG(10, ("revalidating expired entry\n"));
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c
index 5c1b71897d..e5a72cbfd9 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -4237,7 +4237,7 @@ do_query:
DEBUG(10, ("result:\n\thomedir = '%s'\n", *homedir));
DEBUGADD(10, ("\tshell = '%s'\n", *shell));
DEBUGADD(10, ("\tgecos = '%s'\n", *gecos));
- DEBUGADD(10, ("\tgid = '%u'\n", *p_gid));
+ DEBUGADD(10, ("\tgid = '%u'\n", (unsigned int)*p_gid));
wcache_save_user_pwinfo( domain, nt_status, user_sid,
*homedir, *shell, *gecos, *p_gid );
diff --git a/source3/winbindd/winbindd_ccache_access.c b/source3/winbindd/winbindd_ccache_access.c
index a696db1031..dd6d352960 100644
--- a/source3/winbindd/winbindd_ccache_access.c
+++ b/source3/winbindd/winbindd_ccache_access.c
@@ -31,11 +31,12 @@ static bool client_can_access_ccache_entry(uid_t client_uid,
struct WINBINDD_MEMORY_CREDS *entry)
{
if (client_uid == entry->uid || client_uid == 0) {
- DEBUG(10, ("Access granted to uid %d\n", client_uid));
+ DEBUG(10, ("Access granted to uid %u\n", (unsigned int)client_uid));
return True;
}
- DEBUG(1, ("Access denied to uid %d (expected %d)\n", client_uid, entry->uid));
+ DEBUG(1, ("Access denied to uid %u (expected %u)\n",
+ (unsigned int)client_uid, (unsigned int)entry->uid));
return False;
}
@@ -137,9 +138,9 @@ static bool check_client_uid(struct winbindd_cli_state *state, uid_t uid)
}
if (uid != ret_uid) {
- DEBUG(1, ("check_client_uid: Client lied about its uid: said %d, "
- "actually was %d; denying access\n",
- uid, ret_uid));
+ DEBUG(1, ("check_client_uid: Client lied about its uid: said %u, "
+ "actually was %u; denying access\n",
+ (unsigned int)uid, (unsigned int)ret_uid));
return False;
}
diff --git a/source3/winbindd/winbindd_idmap.c b/source3/winbindd/winbindd_idmap.c
index 94a8c78a85..9f5d17ec7c 100644
--- a/source3/winbindd/winbindd_idmap.c
+++ b/source3/winbindd/winbindd_idmap.c
@@ -303,7 +303,7 @@ enum winbindd_result winbindd_dual_sid2uid(struct winbindd_domain *domain,
DEBUG(10, ("winbindd_dual_sid2uid: 0x%08x - %s - %u\n",
NT_STATUS_V(result), sid_string_dbg(&sid),
- state->response.data.uid));
+ (unsigned int)state->response.data.uid));
return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;
}
@@ -376,7 +376,7 @@ enum winbindd_result winbindd_dual_sid2gid(struct winbindd_domain *domain,
DEBUG(10, ("winbindd_dual_sid2gid: 0x%08x - %s - %u\n",
NT_STATUS_V(result), sid_string_dbg(&sid),
- state->response.data.gid));
+ (unsigned int)state->response.data.gid));
return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;
}
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 23de20f0d3..bbf3526fd0 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -544,7 +544,7 @@ static uid_t get_uid_from_state(struct winbindd_cli_state *state)
uid = state->request.data.auth.uid;
if (uid < 0) {
- DEBUG(1,("invalid uid: '%d'\n", uid));
+ DEBUG(1,("invalid uid: '%u'\n", (unsigned int)uid));
return -1;
}
return uid;