[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1557-gb4c9cfb

Jeremy Allison jra at samba.org
Tue May 12 05:03:16 GMT 2009


The branch, master has been updated
       via  b4c9cfb2af8f4dd5e18f032c410694e491f1bd74 (commit)
      from  14c1e9fae2a34d77b0ba21ffb570e84b6e433a14 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit b4c9cfb2af8f4dd5e18f032c410694e491f1bd74
Author: Jeremy Allison <jra at samba.org>
Date:   Mon May 11 21:56:57 2009 -0700

    Fix a bunch of compiler warnings about wrong format types.
    Should make Solaris 10 builds look cleaner.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 nsswitch/wbinfo.c                         |   42 ++++++++++++++++-------------
 source3/auth/auth_util.c                  |   10 +++---
 source3/groupdb/mapping.c                 |    6 ++--
 source3/modules/vfs_solarisacl.c          |   14 +++++-----
 source3/passdb/lookup_sid.c               |    4 +-
 source3/passdb/pdb_interface.c            |    2 +-
 source3/passdb/pdb_ldap.c                 |   14 +++++-----
 source3/rpc_server/srv_samr_nt.c          |    4 +-
 source3/rpcclient/cmd_spoolss.c           |    7 +++--
 source3/torture/cmd_vfs.c                 |    8 +++---
 source3/utils/net_groupmap.c              |    2 +-
 source3/utils/net_rpc.c                   |    4 +-
 source3/utils/net_sam.c                   |   14 +++++-----
 source3/utils/status.c                    |    4 +-
 source3/winbindd/idmap_util.c             |    6 +++-
 source3/winbindd/winbindd_cache.c         |    2 +-
 source3/winbindd/winbindd_ccache_access.c |   11 ++++---
 source3/winbindd/winbindd_idmap.c         |    4 +-
 source3/winbindd/winbindd_pam.c           |    2 +-
 19 files changed, 84 insertions(+), 76 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index 1d7ad00..9ee0e01 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -168,11 +168,11 @@ static bool wbinfo_get_userinfo(char *user)
 		return false;
 	}
 
-	d_printf("%s:%s:%d:%d:%s:%s:%s\n",
+	d_printf("%s:%s:%u:%u:%s:%s:%s\n",
 		 pwd->pw_name,
 		 pwd->pw_passwd,
-		 pwd->pw_uid,
-		 pwd->pw_gid,
+		 (unsigned int)pwd->pw_uid,
+		 (unsigned int)pwd->pw_gid,
 		 pwd->pw_gecos,
 		 pwd->pw_dir,
 		 pwd->pw_shell);
@@ -191,11 +191,11 @@ static bool wbinfo_get_uidinfo(int uid)
 		return false;
 	}
 
-	d_printf("%s:%s:%d:%d:%s:%s:%s\n",
+	d_printf("%s:%s:%u:%u:%s:%s:%s\n",
 		 pwd->pw_name,
 		 pwd->pw_passwd,
-		 pwd->pw_uid,
-		 pwd->pw_gid,
+		 (unsigned int)pwd->pw_uid,
+		 (unsigned int)pwd->pw_gid,
 		 pwd->pw_gecos,
 		 pwd->pw_dir,
 		 pwd->pw_shell);
@@ -215,11 +215,11 @@ static bool wbinfo_get_user_sidinfo(const char *sid_str)
 		return false;
 	}
 
-	d_printf("%s:%s:%d:%d:%s:%s:%s\n",
+	d_printf("%s:%s:%u:%u:%s:%s:%s\n",
 		 pwd->pw_name,
 		 pwd->pw_passwd,
-		 pwd->pw_uid,
-		 pwd->pw_gid,
+		 (unsigned int)pwd->pw_uid,
+		 (unsigned int)pwd->pw_gid,
 		 pwd->pw_gecos,
 		 pwd->pw_dir,
 		 pwd->pw_shell);
@@ -239,10 +239,10 @@ static bool wbinfo_get_groupinfo(const char *group)
 		return false;
 	}
 
-	d_printf("%s:%s:%d\n",
+	d_printf("%s:%s:%u\n",
 		 grp->gr_name,
 		 grp->gr_passwd,
-		 grp->gr_gid);
+		 (unsigned int)grp->gr_gid);
 
 	wbcFreeMemory(grp);
 
@@ -260,10 +260,10 @@ static bool wbinfo_get_gidinfo(int gid)
 		return false;
 	}
 
-	d_printf("%s:%s:%d\n",
+	d_printf("%s:%s:%u\n",
 		 grp->gr_name,
 		 grp->gr_passwd,
-		 grp->gr_gid);
+		 (unsigned int)grp->gr_gid);
 
 	wbcFreeMemory(grp);
 
@@ -844,7 +844,7 @@ static bool wbinfo_allocate_uid(void)
 
 	/* Display response */
 
-	d_printf("New uid: %d\n", uid);
+	d_printf("New uid: %u\n", (unsigned int)uid);
 
 	return true;
 }
@@ -863,7 +863,7 @@ static bool wbinfo_allocate_gid(void)
 
 	/* Display response */
 
-	d_printf("New gid: %d\n", gid);
+	d_printf("New gid: %u\n", (unsigned int)gid);
 
 	return true;
 }
@@ -887,7 +887,8 @@ static bool wbinfo_set_uid_mapping(uid_t uid, const char *sid_str)
 
 	/* Display response */
 
-	d_printf("uid %d now mapped to sid %s\n", uid, sid_str);
+	d_printf("uid %u now mapped to sid %s\n",
+		(unsigned int)uid, sid_str);
 
 	return true;
 }
@@ -911,7 +912,8 @@ static bool wbinfo_set_gid_mapping(gid_t gid, const char *sid_str)
 
 	/* Display response */
 
-	d_printf("gid %d now mapped to sid %s\n", gid, sid_str);
+	d_printf("gid %u now mapped to sid %s\n",
+		(unsigned int)gid, sid_str);
 
 	return true;
 }
@@ -935,7 +937,8 @@ static bool wbinfo_remove_uid_mapping(uid_t uid, const char *sid_str)
 
 	/* Display response */
 
-	d_printf("Removed uid %d to sid %s mapping\n", uid, sid_str);
+	d_printf("Removed uid %u to sid %s mapping\n",
+		(unsigned int)uid, sid_str);
 
 	return true;
 }
@@ -959,7 +962,8 @@ static bool wbinfo_remove_gid_mapping(gid_t gid, const char *sid_str)
 
 	/* Display response */
 
-	d_printf("Removed gid %d to sid %s mapping\n", gid, sid_str);
+	d_printf("Removed gid %u to sid %s mapping\n",
+		(unsigned int)gid, sid_str);
 
 	return true;
 }
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index c0d2347..bdefb71 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 b952cda..4f05d73 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 cafb077..fbfe664 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 a5c2d50..c1249f5 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 1909bd0..340867a 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 01b2eec..2d3b91f 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 e0c785d..dea1a8f 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 124913e..5ea812c 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 17769b1..80ee3ec 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 0a3a297..061ffea 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 9f4470b..4de4bef 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 eea22c0..6b3f5e5 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 831bdcc..cbf0dcb 100644
--- a/source3/utils/status.c


-- 
Samba Shared Repository


More information about the samba-cvs mailing list