[SCM] Samba Shared Repository - branch v3-3-test updated -
release-3-2-0pre2-5007-gaea3895
Jeremy Allison
jra at samba.org
Tue Feb 24 00:24:22 GMT 2009
The branch, v3-3-test has been updated
via aea38950ff4865f1d791cd19619fadcd59eaf480 (commit)
from 6306dd0cab617930176fdde91641344ef403429b (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test
- Log -----------------------------------------------------------------
commit aea38950ff4865f1d791cd19619fadcd59eaf480
Author: Jeremy Allison <jra at samba.org>
Date: Mon Feb 23 16:23:42 2009 -0800
More warning fixes for Solaris.
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source/client/client.c | 6 ++--
source/include/proto.h | 2 +-
source/lib/ldap_debug_handler.c | 4 +--
source/lib/replace/getifaddrs.c | 9 ------
source/lib/smbldap.c | 2 +
source/lib/system.c | 3 +-
source/lib/util_file.c | 4 +-
source/lib/util_tdb.c | 6 +++-
source/libsmb/libsmb_dir.c | 2 +-
source/modules/vfs_extd_audit.c | 8 +++---
source/nmbd/nmbd.c | 14 +++++-----
source/smbd/connection.c | 2 +-
source/smbd/open.c | 2 +-
source/smbd/posix_acls.c | 52 +++++++++++++++++++-------------------
source/smbd/server.c | 2 +-
source/smbd/sesssetup.c | 4 +-
source/utils/smbget.c | 6 +++-
source/winbindd/winbindd.c | 2 +-
source/winbindd/winbindd_cache.c | 18 ++++++------
source/winbindd/winbindd_dual.c | 2 +-
20 files changed, 72 insertions(+), 78 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/client/client.c b/source/client/client.c
index df92bae..53bd9e6 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -1785,13 +1785,13 @@ static struct file_list {
Free a file_list structure.
****************************************************************************/
-static void free_file_list (struct file_list *list_head)
+static void free_file_list (struct file_list *l_head)
{
struct file_list *list, *next;
- for (list = list_head; list; list = next) {
+ for (list = l_head; list; list = next) {
next = list->next;
- DLIST_REMOVE(list_head, list);
+ DLIST_REMOVE(l_head, list);
SAFE_FREE(list->file_path);
SAFE_FREE(list);
}
diff --git a/source/include/proto.h b/source/include/proto.h
index 981a0ee..72d3ffe 100644
--- a/source/include/proto.h
+++ b/source/include/proto.h
@@ -1374,7 +1374,7 @@ bool unmap_file(void* start, size_t size);
void *map_file(char *fname, size_t size);
char **file_lines_load(const char *fname, int *numlines, size_t maxsize);
char **fd_lines_load(int fd, int *numlines, size_t maxsize);
-char **file_lines_pload(char *syscmd, int *numlines);
+char **file_lines_pload(const char *syscmd, int *numlines);
void file_lines_free(char **lines);
void file_lines_slashcont(char **lines);
bool file_save(const char *fname, void *packet, size_t length);
diff --git a/source/lib/ldap_debug_handler.c b/source/lib/ldap_debug_handler.c
index 2181ff0..98623d1 100644
--- a/source/lib/ldap_debug_handler.c
+++ b/source/lib/ldap_debug_handler.c
@@ -19,13 +19,11 @@
#include "includes.h"
-#if HAVE_LDAP
-
+#if defined(HAVE_LDAP) && defined(HAVE_LBER_LOG_PRINT_FN)
static void samba_ldap_log_print_fn(LDAP_CONST char *data)
{
DEBUG(lp_ldap_debug_threshold(), ("[LDAP] %s", data));
}
-
#endif
void init_ldap_debugging(void)
diff --git a/source/lib/replace/getifaddrs.c b/source/lib/replace/getifaddrs.c
index f6f0ec0..3a91bb4 100644
--- a/source/lib/replace/getifaddrs.c
+++ b/source/lib/replace/getifaddrs.c
@@ -84,9 +84,6 @@ int rep_getifaddrs(struct ifaddrs **ifap)
char buff[8192];
int fd, i, n;
struct ifreq *ifr=NULL;
- struct in_addr ipaddr;
- struct in_addr nmask;
- char *iname;
struct ifaddrs *curif;
struct ifaddrs *lastif = NULL;
@@ -164,9 +161,6 @@ int rep_getifaddrs(struct ifaddrs **ifap)
char buff[8192];
int fd, i, n;
struct ifreq *ifr=NULL;
- struct in_addr ipaddr;
- struct in_addr nmask;
- char *iname;
struct ifaddrs *curif;
struct ifaddrs *lastif = NULL;
@@ -265,9 +259,6 @@ int rep_getifaddrs(struct ifaddrs **ifap)
int fd, i;
struct ifconf ifc;
struct ifreq *ifr=NULL;
- struct in_addr ipaddr;
- struct in_addr nmask;
- char *iname;
struct ifaddrs *curif;
struct ifaddrs *lastif = NULL;
diff --git a/source/lib/smbldap.c b/source/lib/smbldap.c
index 8e7ecdf..7e9f1ac 100644
--- a/source/lib/smbldap.c
+++ b/source/lib/smbldap.c
@@ -581,7 +581,9 @@ static void smbldap_store_state(LDAP *ld, struct smbldap_state *smbldap_state)
int smb_ldap_start_tls(LDAP *ldap_struct, int version)
{
+#ifdef LDAP_OPT_X_TLS
int rc;
+#endif
if (lp_ldap_ssl() != LDAP_SSL_START_TLS) {
return LDAP_SUCCESS;
diff --git a/source/lib/system.c b/source/lib/system.c
index 48ecf90..36745b1 100644
--- a/source/lib/system.c
+++ b/source/lib/system.c
@@ -2171,7 +2171,6 @@ static ssize_t solaris_read_xattr(int attrfd, void *value, size_t size)
static ssize_t solaris_list_xattr(int attrdirfd, char *list, size_t size)
{
ssize_t len = 0;
- int stop = 0;
DIR *dirp;
struct dirent *de;
int newfd = dup(attrdirfd);
@@ -2243,7 +2242,7 @@ static int solaris_openat(int fildes, const char *path, int oflag, mode_t mode)
{
int filedes = openat(fildes, path, oflag, mode);
if (filedes == -1) {
- DEBUG(10,("openat FAILED: fd: %s, path: %s, errno: %s\n",filedes,path,strerror(errno)));
+ DEBUG(10,("openat FAILED: fd: %d, path: %s, errno: %s\n",filedes,path,strerror(errno)));
if (errno == EINVAL) {
errno = ENOTSUP;
} else {
diff --git a/source/lib/util_file.c b/source/lib/util_file.c
index b628b06..f9ffa44 100644
--- a/source/lib/util_file.c
+++ b/source/lib/util_file.c
@@ -101,7 +101,7 @@ char *fgets_slash(char *s2,int maxlen,XFILE *f)
Load from a pipe into memory.
****************************************************************************/
-static char *file_pload(char *syscmd, size_t *size)
+static char *file_pload(const char *syscmd, size_t *size)
{
int fd, n;
char *p;
@@ -351,7 +351,7 @@ char **fd_lines_load(int fd, int *numlines, size_t maxsize)
must be freed with file_lines_free().
****************************************************************************/
-char **file_lines_pload(char *syscmd, int *numlines)
+char **file_lines_pload(const char *syscmd, int *numlines)
{
char *p;
size_t size;
diff --git a/source/lib/util_tdb.c b/source/lib/util_tdb.c
index 6d61fd9..e8f6c67 100644
--- a/source/lib/util_tdb.c
+++ b/source/lib/util_tdb.c
@@ -1097,7 +1097,8 @@ int tdb_validate(struct tdb_context *tdb, tdb_validate_data_func validate_fn)
/* parent */
- DEBUG(10, ("tdb_validate: fork succeeded, child PID = %d\n",child_pid));
+ DEBUG(10, ("tdb_validate: fork succeeded, child PID = %u\n",
+ (unsigned int)child_pid));
DEBUG(10, ("tdb_validate: waiting for child to finish...\n"));
while ((wait_pid = sys_waitpid(child_pid, &child_status, 0)) < 0) {
@@ -1113,7 +1114,8 @@ int tdb_validate(struct tdb_context *tdb, tdb_validate_data_func validate_fn)
}
if (wait_pid != child_pid) {
DEBUG(1, ("tdb_validate: waitpid returned pid %d, "
- "but %d was expected\n", wait_pid, child_pid));
+ "but %u was expected\n", wait_pid,
+ (unsigned int)child_pid));
goto done;
}
diff --git a/source/libsmb/libsmb_dir.c b/source/libsmb/libsmb_dir.c
index 610cfcd..89782ce 100644
--- a/source/libsmb/libsmb_dir.c
+++ b/source/libsmb/libsmb_dir.c
@@ -1520,7 +1520,7 @@ SMBC_chmod_ctx(SMBCCTX *context,
return -1;
}
- DEBUG(4, ("smbc_chmod(%s, 0%3o)\n", fname, newmode));
+ DEBUG(4, ("smbc_chmod(%s, 0%3o)\n", fname, (unsigned int)newmode));
if (SMBC_parse_path(frame,
context,
diff --git a/source/modules/vfs_extd_audit.c b/source/modules/vfs_extd_audit.c
index 7516cba..d544988 100644
--- a/source/modules/vfs_extd_audit.c
+++ b/source/modules/vfs_extd_audit.c
@@ -289,7 +289,7 @@ static int audit_chmod(vfs_handle_struct *handle, const char *path, mode_t mode)
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : "");
DEBUG(1, ("vfs_extd_audit: chmod %s mode 0x%x %s %s\n",
- path, mode,
+ path, (unsigned int)mode,
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : ""));
@@ -307,7 +307,7 @@ static int audit_chmod_acl(vfs_handle_struct *handle, const char *path, mode_t m
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : "");
DEBUG(1, ("vfs_extd_audit: chmod_acl %s mode 0x%x %s %s\n",
- path, mode,
+ path, (unsigned int)mode,
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : ""));
@@ -325,7 +325,7 @@ static int audit_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mod
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : "");
DEBUG(1, ("vfs_extd_audit: fchmod %s mode 0x%x %s %s",
- fsp->fsp_name, mode,
+ fsp->fsp_name, (unsigned int)mode,
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : ""));
@@ -343,7 +343,7 @@ static int audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : "");
DEBUG(1, ("vfs_extd_audit: fchmod_acl %s mode 0x%x %s %s",
- fsp->fsp_name, mode,
+ fsp->fsp_name, (unsigned int)mode,
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : ""));
diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c
index 7ea2bd0..7786bef 100644
--- a/source/nmbd/nmbd.c
+++ b/source/nmbd/nmbd.c
@@ -381,18 +381,18 @@ static void msg_nmbd_send_packet(struct messaging_context *msg,
const struct sockaddr_storage *pss;
const struct in_addr *local_ip;
- DEBUG(10, ("Received send_packet from %d\n", procid_to_pid(&src)));
+ DEBUG(10, ("Received send_packet from %u\n", (unsigned int)procid_to_pid(&src)));
if (data->length != sizeof(struct packet_struct)) {
- DEBUG(2, ("Discarding invalid packet length from %d\n",
- procid_to_pid(&src)));
+ DEBUG(2, ("Discarding invalid packet length from %u\n",
+ (unsigned int)procid_to_pid(&src)));
return;
}
if ((p->packet_type != NMB_PACKET) &&
(p->packet_type != DGRAM_PACKET)) {
- DEBUG(2, ("Discarding invalid packet type from %d: %d\n",
- procid_to_pid(&src), p->packet_type));
+ DEBUG(2, ("Discarding invalid packet type from %u: %d\n",
+ (unsigned int)procid_to_pid(&src), p->packet_type));
return;
}
@@ -400,8 +400,8 @@ static void msg_nmbd_send_packet(struct messaging_context *msg,
pss = iface_ip(&ss);
if (pss == NULL) {
- DEBUG(2, ("Could not find ip for packet from %d\n",
- procid_to_pid(&src)));
+ DEBUG(2, ("Could not find ip for packet from %u\n",
+ (unsigned int)procid_to_pid(&src)));
return;
}
diff --git a/source/smbd/connection.c b/source/smbd/connection.c
index fd83f77..74b25b6 100644
--- a/source/smbd/connection.c
+++ b/source/smbd/connection.c
@@ -241,7 +241,7 @@ static TDB_DATA* make_pipe_rec_key( struct pipe_open_rec *prec )
}
snprintf( key_string, sizeof(key_string), "%s/%d/%d",
- prec->name, procid_to_pid(&prec->pid), prec->pnum );
+ prec->name, (int)procid_to_pid(&prec->pid), prec->pnum );
*kbuf = string_term_tdb_data(talloc_strdup(prec, key_string));
if (kbuf->dptr == NULL )
diff --git a/source/smbd/open.c b/source/smbd/open.c
index bbf1b40..31679b5 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -1412,7 +1412,7 @@ static NTSTATUS open_file_ntcreate_internal(connection_struct *conn,
"create_disposition = 0x%x create_options=0x%x "
"unix mode=0%o oplock_request=%d\n",
fname, new_dos_attributes, access_mask, share_access,
- create_disposition, create_options, unx_mode,
+ create_disposition, create_options, (unsigned int)unx_mode,
oplock_request));
if ((req == NULL) && ((oplock_request & INTERNAL_OPEN_ONLY) == 0)) {
diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c
index 00f7f1c..16acca4 100644
--- a/source/smbd/posix_acls.c
+++ b/source/smbd/posix_acls.c
@@ -563,12 +563,12 @@ static struct pai_val *load_inherited_info(const struct connection_struct *conn,
Count a linked list of canonical ACE entries.
****************************************************************************/
-static size_t count_canon_ace_list( canon_ace *list_head )
+static size_t count_canon_ace_list( canon_ace *l_head )
{
size_t count = 0;
canon_ace *ace;
- for (ace = list_head; ace; ace = ace->next)
+ for (ace = l_head; ace; ace = ace->next)
count++;
return count;
@@ -578,13 +578,13 @@ static size_t count_canon_ace_list( canon_ace *list_head )
Free a linked list of canonical ACE entries.
****************************************************************************/
-static void free_canon_ace_list( canon_ace *list_head )
+static void free_canon_ace_list( canon_ace *l_head )
{
canon_ace *list, *next;
- for (list = list_head; list; list = next) {
+ for (list = l_head; list; list = next) {
next = list->next;
- DLIST_REMOVE(list_head, list);
+ DLIST_REMOVE(l_head, list);
SAFE_FREE(list);
}
}
@@ -760,7 +760,7 @@ static bool identity_in_ace_equal(canon_ace *ace1, canon_ace *ace2)
static void merge_aces( canon_ace **pp_list_head )
{
- canon_ace *list_head = *pp_list_head;
+ canon_ace *l_head = *pp_list_head;
canon_ace *curr_ace_outer;
canon_ace *curr_ace_outer_next;
@@ -769,7 +769,7 @@ static void merge_aces( canon_ace **pp_list_head )
* with identical SIDs.
*/
- for (curr_ace_outer = list_head; curr_ace_outer; curr_ace_outer = curr_ace_outer_next) {
+ for (curr_ace_outer = l_head; curr_ace_outer; curr_ace_outer = curr_ace_outer_next) {
canon_ace *curr_ace;
canon_ace *curr_ace_next;
@@ -791,7 +791,7 @@ static void merge_aces( canon_ace **pp_list_head )
/* Merge two allow or two deny ACE's. */
curr_ace_outer->perms |= curr_ace->perms;
- DLIST_REMOVE(list_head, curr_ace);
+ DLIST_REMOVE(l_head, curr_ace);
SAFE_FREE(curr_ace);
curr_ace_outer_next = curr_ace_outer->next; /* We may have deleted the link. */
}
@@ -804,7 +804,7 @@ static void merge_aces( canon_ace **pp_list_head )
* appears only once in the list.
*/
- for (curr_ace_outer = list_head; curr_ace_outer; curr_ace_outer = curr_ace_outer_next) {
+ for (curr_ace_outer = l_head; curr_ace_outer; curr_ace_outer = curr_ace_outer_next) {
canon_ace *curr_ace;
canon_ace *curr_ace_next;
@@ -836,7 +836,7 @@ static void merge_aces( canon_ace **pp_list_head )
* The deny overrides the allow. Remove the allow.
*/
- DLIST_REMOVE(list_head, curr_ace);
+ DLIST_REMOVE(l_head, curr_ace);
SAFE_FREE(curr_ace);
curr_ace_outer_next = curr_ace_outer->next; /* We may have deleted the link. */
@@ -852,7 +852,7 @@ static void merge_aces( canon_ace **pp_list_head )
* before we can get to an allow ace.
*/
- DLIST_REMOVE(list_head, curr_ace_outer);
+ DLIST_REMOVE(l_head, curr_ace_outer);
SAFE_FREE(curr_ace_outer);
break;
}
@@ -863,7 +863,7 @@ static void merge_aces( canon_ace **pp_list_head )
/* We may have modified the list. */
- *pp_list_head = list_head;
+ *pp_list_head = l_head;
}
/****************************************************************************
@@ -2147,12 +2147,12 @@ static bool unpack_canon_ace(files_struct *fsp,
static void arrange_posix_perms(const char *filename, canon_ace **pp_list_head)
{
- canon_ace *list_head = *pp_list_head;
+ canon_ace *l_head = *pp_list_head;
canon_ace *owner_ace = NULL;
canon_ace *other_ace = NULL;
canon_ace *ace = NULL;
- for (ace = list_head; ace; ace = ace->next) {
+ for (ace = l_head; ace; ace = ace->next) {
if (ace->type == SMB_ACL_USER_OBJ)
owner_ace = ace;
else if (ace->type == SMB_ACL_OTHER) {
@@ -2173,16 +2173,16 @@ static void arrange_posix_perms(const char *filename, canon_ace **pp_list_head)
*/
if (owner_ace) {
- DLIST_PROMOTE(list_head, owner_ace);
+ DLIST_PROMOTE(l_head, owner_ace);
}
if (other_ace) {
- DLIST_DEMOTE(list_head, other_ace, canon_ace *);
+ DLIST_DEMOTE(l_head, other_ace, canon_ace *);
}
/* We have probably changed the head of the list. */
- *pp_list_head = list_head;
+ *pp_list_head = l_head;
}
/****************************************************************************
@@ -2195,7 +2195,7 @@ static canon_ace *canonicalise_acl(struct connection_struct *conn,
const DOM_SID *powner, const DOM_SID *pgroup, struct pai_val *pal, SMB_ACL_TYPE_T the_acl_type)
{
mode_t acl_mask = (S_IRUSR|S_IWUSR|S_IXUSR);
- canon_ace *list_head = NULL;
+ canon_ace *l_head = NULL;
canon_ace *ace = NULL;
canon_ace *next_ace = NULL;
int entry_id = SMB_ACL_FIRST_ENTRY;
@@ -2299,14 +2299,14 @@ static canon_ace *canonicalise_acl(struct connection_struct *conn,
ace->owner_type = owner_type;
ace->inherited = get_inherited_flag(pal, ace, (the_acl_type == SMB_ACL_TYPE_DEFAULT));
- DLIST_ADD(list_head, ace);
+ DLIST_ADD(l_head, ace);
}
/*
* This next call will ensure we have at least a user/group/world set.
*/
- if (!ensure_canon_entry_valid(&list_head, conn->params,
+ if (!ensure_canon_entry_valid(&l_head, conn->params,
S_ISDIR(psbuf->st_mode), powner, pgroup,
psbuf, False))
goto fail;
@@ -2318,7 +2318,7 @@ static canon_ace *canonicalise_acl(struct connection_struct *conn,
DEBUG(10,("canonicalise_acl: %s ace entries before arrange :\n", the_acl_type == SMB_ACL_TYPE_ACCESS ? "Access" : "Default" ));
- for ( ace_count = 0, ace = list_head; ace; ace = next_ace, ace_count++) {
+ for ( ace_count = 0, ace = l_head; ace; ace = next_ace, ace_count++) {
next_ace = ace->next;
/* Masks are only applied to entries other than USER_OBJ and OTHER. */
@@ -2326,7 +2326,7 @@ static canon_ace *canonicalise_acl(struct connection_struct *conn,
ace->perms &= acl_mask;
if (ace->perms == 0) {
- DLIST_PROMOTE(list_head, ace);
+ DLIST_PROMOTE(l_head, ace);
}
if( DEBUGLVL( 10 ) ) {
@@ -2334,15 +2334,15 @@ static canon_ace *canonicalise_acl(struct connection_struct *conn,
}
}
- arrange_posix_perms(fname,&list_head );
+ arrange_posix_perms(fname,&l_head );
- print_canon_ace_list( "canonicalise_acl: ace entries after arrange", list_head );
+ print_canon_ace_list( "canonicalise_acl: ace entries after arrange", l_head );
- return list_head;
+ return l_head;
fail:
- free_canon_ace_list(list_head);
+ free_canon_ace_list(l_head);
return NULL;
}
diff --git a/source/smbd/server.c b/source/smbd/server.c
index 6edef00..00a2cd4 100644
--- a/source/smbd/server.c
+++ b/source/smbd/server.c
@@ -299,7 +299,7 @@ static void remove_child_pid(pid_t pid, bool unclean_shutdown)
/* a child terminated uncleanly so tickle all processes to see
if they can grab any of the pending locks
*/
- DEBUG(3,(__location__ " Unclean shutdown of pid %u\n", pid));
+ DEBUG(3,(__location__ " Unclean shutdown of pid %u\n", (unsigned int)pid));
messaging_send_buf(smbd_messaging_context(), procid_self(),
MSG_SMB_BRL_VALIDATE, NULL, 0);
message_send_all(smbd_messaging_context(),
diff --git a/source/smbd/sesssetup.c b/source/smbd/sesssetup.c
index 2221574..6d7eb6f 100644
--- a/source/smbd/sesssetup.c
--
Samba Shared Repository
More information about the samba-cvs
mailing list