s3-auth remove unused copy_serverinfo
authorAndrew Bartlett <abartlet@samba.org>
Fri, 15 Jul 2011 06:49:21 +0000 (16:49 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 19 Jul 2011 23:17:11 +0000 (09:17 +1000)
Signed-off-by: Andrew Tridgell <tridge@samba.org>
source3/auth/auth_util.c
source3/auth/proto.h

index da84e0a424c3335d0001b173b860af379db5824b..6a4e71f77ee0ae2350d9e46728e4f027955eb50e 100644 (file)
@@ -909,65 +909,6 @@ NTSTATUS make_session_info_from_username(TALLOC_CTX *mem_ctx,
 }
 
 
-struct auth_serversupplied_info *copy_serverinfo(TALLOC_CTX *mem_ctx,
-                                                const struct auth_serversupplied_info *src)
-{
-       struct auth_serversupplied_info *dst;
-
-       dst = make_server_info(mem_ctx);
-       if (dst == NULL) {
-               return NULL;
-       }
-
-       dst->guest = src->guest;
-       dst->system = src->system;
-       dst->utok.uid = src->utok.uid;
-       dst->utok.gid = src->utok.gid;
-       dst->utok.ngroups = src->utok.ngroups;
-       if (src->utok.ngroups != 0) {
-               dst->utok.groups = (gid_t *)talloc_memdup(
-                       dst, src->utok.groups,
-                       sizeof(gid_t)*dst->utok.ngroups);
-       } else {
-               dst->utok.groups = NULL;
-       }
-
-       if (src->security_token) {
-               dst->security_token = dup_nt_token(dst, src->security_token);
-               if (!dst->security_token) {
-                       TALLOC_FREE(dst);
-                       return NULL;
-               }
-       }
-
-       dst->session_key = data_blob_talloc( dst, src->session_key.data,
-                                               src->session_key.length);
-
-       dst->lm_session_key = data_blob_talloc(dst, src->lm_session_key.data,
-                                               src->lm_session_key.length);
-
-       dst->info3 = copy_netr_SamInfo3(dst, src->info3);
-       if (!dst->info3) {
-               TALLOC_FREE(dst);
-               return NULL;
-       }
-       dst->extra = src->extra;
-
-       dst->unix_name = talloc_strdup(dst, src->unix_name);
-       if (!dst->unix_name) {
-               TALLOC_FREE(dst);
-               return NULL;
-       }
-
-       dst->sanitized_username = talloc_strdup(dst, src->sanitized_username);
-       if (!dst->sanitized_username) {
-               TALLOC_FREE(dst);
-               return NULL;
-       }
-
-       return dst;
-}
-
 static struct auth_serversupplied_info *copy_session_info_serverinfo(TALLOC_CTX *mem_ctx,
                                                              const struct auth3_session_info *src)
 {
index 9f497a48e376865fd82d20e4b7bac53b27e7a6ce..f1a0b14a90a20be9114e6b9b6e09adc70233ff8f 100644 (file)
@@ -166,8 +166,6 @@ NTSTATUS make_session_info_from_username(TALLOC_CTX *mem_ctx,
                                         const char *username,
                                         bool is_guest,
                                         struct auth3_session_info **session_info);
-struct auth_serversupplied_info *copy_serverinfo(TALLOC_CTX *mem_ctx,
-                                                const struct auth_serversupplied_info *src);
 struct auth3_session_info *copy_session_info(TALLOC_CTX *mem_ctx,
                                             const struct auth3_session_info *src);
 bool init_guest_info(void);