s3-lib Remove unused get_cmdline_auth_info_copy
authorAndrew Bartlett <abartlet@samba.org>
Tue, 12 Jul 2011 06:36:34 +0000 (16:36 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 14 Jul 2011 05:06:45 +0000 (15:06 +1000)
source3/include/proto.h
source3/lib/util_cmdline.c

index c3e680d8b6b8ee7eff9639b3bd85025e8ca3bbd5..010992de48bdecc456513e6e835c1d79ee486f6f 100644 (file)
@@ -637,8 +637,6 @@ void set_cmdline_auth_info_use_machine_account(struct user_auth_info *auth_info)
 bool get_cmdline_auth_info_got_pass(const struct user_auth_info *auth_info);
 bool get_cmdline_auth_info_smb_encrypt(const struct user_auth_info *auth_info);
 bool get_cmdline_auth_info_use_machine_account(const struct user_auth_info *auth_info);
-struct user_auth_info *get_cmdline_auth_info_copy(TALLOC_CTX *mem_ctx,
-                                                const struct user_auth_info *info);
 bool set_cmdline_auth_info_machine_account_creds(struct user_auth_info *auth_info);
 void set_cmdline_auth_info_getpass(struct user_auth_info *auth_info);
 
index 39f136821ce22b0ba62a511af9cecc71044fea6d..81b158e43865f077dcdea96ad0962bb42ddc23ff 100644 (file)
@@ -190,30 +190,6 @@ bool get_cmdline_auth_info_use_machine_account(const struct user_auth_info *auth
        return auth_info->use_machine_account;
 }
 
-struct user_auth_info *get_cmdline_auth_info_copy(TALLOC_CTX *mem_ctx,
-                                                 const struct user_auth_info *src)
-{
-       struct user_auth_info *result;
-
-       result = user_auth_info_init(mem_ctx);
-       if (result == NULL) {
-               return NULL;
-       }
-
-       *result = *src;
-
-       result->username = talloc_strdup(
-               result, get_cmdline_auth_info_username(src));
-       result->password = talloc_strdup(
-               result, get_cmdline_auth_info_password(src));
-       if ((result->username == NULL) || (result->password == NULL)) {
-               TALLOC_FREE(result);
-               return NULL;
-       }
-
-       return result;
-}
-
 bool set_cmdline_auth_info_machine_account_creds(struct user_auth_info *auth_info)
 {
        char *pass = NULL;