summaryrefslogtreecommitdiff
path: root/source3/client/cifs.upcall.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2008-09-12 21:13:54 -0400
committerJeff Layton <jlayton@redhat.com>2008-09-12 21:13:54 -0400
commit56d5149dc68c30079fc533f5b6f6adbb1f47f246 (patch)
treea072640c8fc619355b89902274dbeb454616cadb /source3/client/cifs.upcall.c
parentc7b75de96269e55f07a3e788e5c99067e291e069 (diff)
downloadsamba-56d5149dc68c30079fc533f5b6f6adbb1f47f246.tar.gz
samba-56d5149dc68c30079fc533f5b6f6adbb1f47f246.tar.bz2
samba-56d5149dc68c30079fc533f5b6f6adbb1f47f246.zip
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@redhat.com> (This used to be commit f0ee2c145fa031f91c28a69a44b7652f18eea0f0)
Diffstat (limited to 'source3/client/cifs.upcall.c')
-rw-r--r--source3/client/cifs.upcall.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/source3/client/cifs.upcall.c b/source3/client/cifs.upcall.c
index 7cb51660d7..4110de35fd 100644
--- a/source3/client/cifs.upcall.c
+++ b/source3/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;
@@ -56,7 +57,8 @@ typedef enum _secType {
*
* 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;
@@ -88,7 +90,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;
@@ -151,7 +154,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;
@@ -203,7 +207,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);
@@ -215,12 +219,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;