]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Fixed merging mess.
authorTim Potter <tpot@samba.org>
Fri, 13 Oct 2000 05:22:26 +0000 (05:22 +0000)
committerTim Potter <tpot@samba.org>
Fri, 13 Oct 2000 05:22:26 +0000 (05:22 +0000)
source/nsswitch/wbinfo.c

index e26b0c1b261382269bf4fa20c6396810d9260ad0..9f97070be18a35a71564d6ee2b7d13d64ad296ec 100644 (file)
@@ -32,6 +32,8 @@ enum nss_status winbindd_request(int req_type,
                                 struct winbindd_request *request,
                                 struct winbindd_response *response);
 
+/* List groups a user is a member of */
+
 static BOOL wbinfo_get_usergroups(char *user)
 {
        struct winbindd_request request;
@@ -89,7 +91,26 @@ static BOOL wbinfo_list_domains(void)
 
 static BOOL wbinfo_check_secret(void)
 {
-       return False;
+        struct winbindd_response response;
+        BOOL result;
+
+        ZERO_STRUCT(response);
+
+        result = winbindd_request(WINBINDD_CHECK_MACHACC, NULL, &response) ==
+                NSS_STATUS_SUCCESS;
+
+        if (result) {
+
+                if (response.data.num_entries) {
+                        printf("Secret is good\n");
+                } else {
+                        printf("Secret is bad\n");
+                }
+
+                return True;
+        }
+
+        return False;
 }
 
 /* Convert uid to sid */
@@ -426,8 +447,8 @@ int main(int argc, char **argv)
                                return 1;
                        }
                        break;
-
-                       /* Invalid option */
+                               
+                      /* Invalid option */
 
                default:
                        usage();