summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-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
4 files changed, 12 insertions, 12 deletions
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),