summaryrefslogtreecommitdiffstats
path: root/source3/utils
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-05-11 21:56:57 -0700
committerJeremy Allison <jra@samba.org>2009-05-11 21:56:57 -0700
commitb4c9cfb2af8f4dd5e18f032c410694e491f1bd74 (patch)
treec4cfaa30ad841a7b425ecd903edf2f0fc304f833 /source3/utils
parent14c1e9fae2a34d77b0ba21ffb570e84b6e433a14 (diff)
downloadsamba-b4c9cfb2af8f4dd5e18f032c410694e491f1bd74.tar.gz
samba-b4c9cfb2af8f4dd5e18f032c410694e491f1bd74.tar.xz
samba-b4c9cfb2af8f4dd5e18f032c410694e491f1bd74.zip
Fix a bunch of compiler warnings about wrong format types.
Should make Solaris 10 builds look cleaner. Jeremy.
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 0a3a2972e4b..061ffea029e 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 9f4470b60d2..4de4bef837a 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 eea22c0dc20..6b3f5e57211 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 831bdcca185..cbf0dcb2b5a 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),