[SCM] Samba Shared Repository - branch v3-0-test updated - release-3-0-32-38-ga605c53

jlayton at samba.org jlayton at samba.org
Sun Sep 14 12:38:21 GMT 2008


The branch, v3-0-test has been updated
       via  a605c5352485cf1b50090301b909b5258de8be8c (commit)
       via  99e75f00710be8369d844c58bd208938b902a49e (commit)
      from  d2bea898942e213fb1e33f46c76274527928473d (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-0-test


- Log -----------------------------------------------------------------
commit a605c5352485cf1b50090301b909b5258de8be8c
Author: Jeff Layton <jlayton at redhat.com>
Date:   Sun Sep 14 08:37:58 2008 -0400

    mount.cifs: make local versions of strlcat and strlcpy static
    
    ...to silence -Wmissing-prototypes
    
    Signed-off-by: Jeff Layton <jlayton at redhat.com>

commit 99e75f00710be8369d844c58bd208938b902a49e
Author: Jeff Layton <jlayton at redhat.com>
Date:   Sun Sep 14 08:37:57 2008 -0400

    cifs.upcall: make most functions static and silence compiler warnings
    
    ...to silence -Wmissing-prototypes and some uninit'ed variable
    warnings. Thanks to GD for the extra-paranoid compiler flags.
    
    Signed-off-by: Jeff Layton <jlayton at redhat.com>

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

Summary of changes:
 source/client/cifs.upcall.c |   18 +++++++++++-------
 source/client/mount.cifs.c  |    4 ++--
 2 files changed, 13 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/cifs.upcall.c b/source/client/cifs.upcall.c
index 3bb5658..35b90c3 100644
--- a/source/client/cifs.upcall.c
+++ b/source/client/cifs.upcall.c
@@ -32,6 +32,7 @@ create dns_resolver * * /usr/local/sbin/cifs.upcall %k
 const char *CIFSSPNEGO_VERSION = "1.2";
 static const char *prog = "cifs.upcall";
 typedef enum _secType {
+	NONE = 0,
 	KRB5,
 	MS_KRB5
 } secType_t;
@@ -57,7 +58,8 @@ const DATA_BLOB data_blob_null = { NULL, 0, NULL };
  *
  * ret: 0 - success, others - failure
 */
-int handle_krb5_mech(const char *oid, const char *principal,
+static int
+handle_krb5_mech(const char *oid, const char *principal,
 		     DATA_BLOB * secblob, DATA_BLOB * sess_key)
 {
 	int retval;
@@ -89,7 +91,8 @@ int handle_krb5_mech(const char *oid, const char *principal,
 #define DKD_HAVE_UID		32
 #define DKD_MUSTHAVE_SET (DKD_HAVE_HOSTNAME|DKD_HAVE_VERSION|DKD_HAVE_SEC)
 
-int decode_key_description(const char *desc, int *ver, secType_t * sec,
+static int
+decode_key_description(const char *desc, int *ver, secType_t * sec,
 			   char **hostname, uid_t * uid)
 {
 	int retval = 0;
@@ -152,7 +155,8 @@ int decode_key_description(const char *desc, int *ver, secType_t * sec,
 	return retval;
 }
 
-int cifs_resolver(const key_serial_t key, const char *key_descr)
+static int
+cifs_resolver(const key_serial_t key, const char *key_descr)
 {
 	int c;
 	struct addrinfo *addr;
@@ -204,7 +208,7 @@ int cifs_resolver(const key_serial_t key, const char *key_descr)
 	return 0;
 }
 
-void
+static void
 usage(void)
 {
 	syslog(LOG_WARNING, "Usage: %s [-c] [-v] key_serial", prog);
@@ -216,12 +220,12 @@ int main(const int argc, char *const argv[])
 	struct cifs_spnego_msg *keydata = NULL;
 	DATA_BLOB secblob = data_blob_null;
 	DATA_BLOB sess_key = data_blob_null;
-	secType_t sectype;
+	secType_t sectype = NONE;
 	key_serial_t key = 0;
 	size_t datalen;
 	long rc = 1;
-	uid_t uid;
-	int kernel_upcall_version;
+	uid_t uid = 0;
+	int kernel_upcall_version = 0;
 	int c, use_cifs_service_prefix = 0;
 	char *buf, *hostname = NULL;
 	const char *oid;
diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index 7227153..0d27c05 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -87,7 +87,7 @@ char * prefixpath = NULL;
 
 /* like strncpy but does not 0 fill the buffer and always null
  *    terminates. bufsize is the size of the destination buffer */
-size_t strlcpy(char *d, const char *s, size_t bufsize)
+static size_t strlcpy(char *d, const char *s, size_t bufsize)
 {
 	size_t len = strlen(s);
 	size_t ret = len;
@@ -101,7 +101,7 @@ size_t strlcpy(char *d, const char *s, size_t bufsize)
 /* like strncat but does not 0 fill the buffer and always null
  *    terminates. bufsize is the length of the buffer, which should
  *       be one more than the maximum resulting string length */
-size_t strlcat(char *d, const char *s, size_t bufsize)
+static size_t strlcat(char *d, const char *s, size_t bufsize)
 {
 	size_t len1 = strlen(d);
 	size_t len2 = strlen(s);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list