fix sense of lp_allow_trusted_domains()
authorAndrew Tridgell <tridge@samba.org>
Tue, 27 Nov 2001 03:25:31 +0000 (03:25 +0000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 27 Nov 2001 03:25:31 +0000 (03:25 +0000)
fix a memory leak
(This used to be commit 1421f2fbcb296a894cb4e7548e0275e35e055b98)

source3/auth/auth.c
source3/auth/auth_domain.c
source3/auth/auth_info.c

index e22c52702c9152f0466bfccc211eab282930f53e..a32d607e97e1ab3386901266c047847243be3f68 100644 (file)
@@ -36,7 +36,7 @@ static BOOL check_domain_match(char *user, char *domain)
    */
 
   if (!lp_allow_trusted_domains() &&
-      (strequal("", domain) || strequal(lp_workgroup(), domain) || is_netbios_alias_or_name(domain))) {
+      !(strequal("", domain) || strequal(lp_workgroup(), domain) || is_netbios_alias_or_name(domain))) {
       DEBUG(1, ("check_domain_match: Attempt to connect as user %s from domain %s denied.\n", user, domain));
       return False;
   } else {
index a41e43bd8294a7b65a1d73337bdbba624e76a2f7..a779a7e9c0df0be561985d4fe22b3b410e617b86 100644 (file)
@@ -38,7 +38,7 @@ static BOOL connect_to_domain_password_server(struct cli_state *pcli,
        fstring remote_machine;
         NTSTATUS result;
 
-       if(cli_initialise(pcli) == NULL) {
+       if (cli_initialise(pcli) == NULL) {
                DEBUG(0,("connect_to_domain_password_server: unable to initialize client connection.\n"));
                return False;
        }
index 99648aba8d28ab874493a33001c8016146835e79..4b372c163219c9d550cdae37377ec8a3e7fe8a0f 100644 (file)
@@ -92,15 +92,6 @@ static BOOL make_auth_info_text_list(auth_authsupplied_info **auth_info, char **
                        if (strequal(builtin_auth_init_functions[i].name, *text_list))
                        {
                                DEBUG(5,("Found auth method %s (at pos %d)\n", *text_list, i));
-                               /* Malloc entry,  fill it,  link it */
-                               t = (auth_methods *)malloc(sizeof(*t));
-                               if (!t) {
-                                       DEBUG(0,("make_pw_chat: malloc failed!\n"));
-                                       return False;
-                               }
-                               
-                               ZERO_STRUCTP(t);
-                               
                                if (builtin_auth_init_functions[i].init(&t)) {
                                        DEBUG(5,("auth method %s has a valid init\n", *text_list));
                                        t->name = builtin_auth_init_functions[i].name;