s3:smbd: add smbd_smb2_fake_smb_request()
[ira/wip.git] / nsswitch / wbinfo.c
index 1d7ad004acc4fca7f0ee81384e74244834c39dcc..04adddaf48c5bcaaff14004903c46a36c162e38e 100644 (file)
@@ -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;
 }
@@ -2027,7 +2031,8 @@ int main(int argc, char **argv, char **envp)
                                uint32 flags =  WBFLAG_PAM_KRB5 |
                                                WBFLAG_PAM_CACHED_LOGIN |
                                                WBFLAG_PAM_FALLBACK_AFTER_KRB5 |
-                                               WBFLAG_PAM_INFO3_TEXT;
+                                               WBFLAG_PAM_INFO3_TEXT |
+                                               WBFLAG_PAM_CONTACT_TRUSTDOM;
 
                                if (!wbinfo_auth_krb5(string_arg, "FILE", flags)) {
                                        d_fprintf(stderr, "Could not authenticate user [%s] with "