]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/gssd/gssd_proc.c
Removed warnings from gssd_proc.c
[nfs-utils.git] / utils / gssd / gssd_proc.c
index 50a27e418f2add809d2a63fdd29a3716c2fd53c2..c301d467d26c88e039570153deb7137bdf979aba 100644 (file)
@@ -655,7 +655,7 @@ parse_enctypes(char *enctypes)
        }
 
        num_krb5_enctypes = n;
-       if (cached_types = malloc(strlen(enctypes)+1))
+       if ((cached_types = malloc(strlen(enctypes)+1)))
                strcpy(cached_types, enctypes);
 
        return 0;
@@ -859,7 +859,7 @@ int create_auth_rpc_client(struct clnt_info *clp,
                 * Do this before creating rpc connection since we won't need
                 * rpc connection if it fails!
                 */
-               if (limit_krb5_enctypes(&sec, uid)) {
+               if (limit_krb5_enctypes(&sec)) {
                        printerr(1, "WARNING: Failed while limiting krb5 "
                                    "encryption types for user with uid %d\n",
                                 uid);
@@ -936,7 +936,7 @@ int create_auth_rpc_client(struct clnt_info *clp,
        if (sec.cred != GSS_C_NO_CREDENTIAL)
                gss_release_cred(&min_stat, &sec.cred);
        /* Restore euid to original value */
-       if ((save_uid != -1) && (setfsuid(save_uid) != uid)) {
+       if (((int)save_uid != -1) && (setfsuid(save_uid) != (int)uid)) {
                printerr(0, "WARNING: Failed to restore fsuid"
                            " to uid %d from %d\n", save_uid, uid);
        }
@@ -1161,7 +1161,7 @@ handle_krb5_upcall(struct clnt_info *clp)
 {
        uid_t                   uid;
 
-       if (read(clp->krb5_fd, &uid, sizeof(uid)) < sizeof(uid)) {
+       if (read(clp->krb5_fd, &uid, sizeof(uid)) < (ssize_t)sizeof(uid)) {
                printerr(0, "WARNING: failed reading uid from krb5 "
                            "upcall pipe: %s\n", strerror(errno));
                return;
@@ -1175,7 +1175,7 @@ handle_spkm3_upcall(struct clnt_info *clp)
 {
        uid_t                   uid;
 
-       if (read(clp->spkm3_fd, &uid, sizeof(uid)) < sizeof(uid)) {
+       if (read(clp->spkm3_fd, &uid, sizeof(uid)) < (ssize_t)sizeof(uid)) {
                printerr(0, "WARNING: failed reading uid from spkm3 "
                         "upcall pipe: %s\n", strerror(errno));
                return;
@@ -1189,7 +1189,7 @@ handle_gssd_upcall(struct clnt_info *clp)
 {
        uid_t                   uid;
        char                    *lbuf = NULL;
-       int                     lbuflen = 0, code;
+       int                     lbuflen = 0;
        char                    *p;
        char                    *mech = NULL;
        char                    *target = NULL;
@@ -1251,7 +1251,7 @@ handle_gssd_upcall(struct clnt_info *clp)
                }
                if (parse_enctypes(enctypes) != 0) {
                        printerr(0, "WARNING: handle_gssd_upcall: "
-                               "parsing encryption types failed: errno %d\n", code);
+                               "parsing encryption types failed: errno %d\n", errno);
                }
        }