Loading source3/auth/auth_util.c +3 −0 Original line number Diff line number Diff line Loading @@ -1236,6 +1236,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, info3->gids[i].g_rid)); SAFE_FREE(lgroupSIDs); SAFE_FREE(all_group_SIDs); free_server_info(server_info); return nt_status; Loading Loading @@ -1264,6 +1265,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, if ( !NT_STATUS_IS_OK(nt_status) ) { DEBUG(4,("create_nt_user_token failed\n")); SAFE_FREE(lgroupSIDs); SAFE_FREE(all_group_SIDs); free_server_info(server_info); return nt_status; Loading @@ -1271,6 +1273,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, (*server_info)->ptok = token; SAFE_FREE(lgroupSIDs); SAFE_FREE(all_group_SIDs); /* ensure we are never given NULL session keys */ Loading source3/auth/auth_winbind.c +2 −3 Original line number Diff line number Diff line Loading @@ -127,9 +127,7 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context, if (result == NSS_STATUS_SUCCESS && response.extra_data) { if (NT_STATUS_IS_OK(nt_status)) { if (NT_STATUS_IS_OK(nt_status = get_info3_from_ndr(mem_ctx, &response, &info3))) { if (NT_STATUS_IS_OK(nt_status = get_info3_from_ndr(mem_ctx, &response, &info3))) { nt_status = make_server_info_info3(mem_ctx, user_info->internal_username.str, user_info->smb_name.str, user_info->domain.str, Loading @@ -141,6 +139,7 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context, nt_status = NT_STATUS_NO_LOGON_SERVERS; } SAFE_FREE(response.extra_data); return nt_status; } Loading source3/libsmb/trustdom_cache.c +27 −10 Original line number Diff line number Diff line Loading @@ -114,12 +114,14 @@ BOOL trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid, { char *key, *alt_key; fstring sid_string; BOOL ret; /* * we use gecache call to avoid annoying debug messages * about initialised trustdom */ if (!gencache_init()) return False; if (!gencache_init()) return False; DEBUG(5, ("trustdom_store: storing SID %s of domain %s\n", sid_string_static(sid), name)); Loading @@ -134,11 +136,18 @@ BOOL trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid, * try to put the names in the cache */ if (alt_key) { return (gencache_set(alt_key, sid_string, timeout) && gencache_set(key, sid_string, timeout)); ret = gencache_set(alt_key, sid_string, timeout); if ( ret ) { ret = gencache_set(key, sid_string, timeout); } SAFE_FREE(alt_key); SAFE_FREE(key); return ret; } return gencache_set(key, sid_string, timeout); ret = gencache_set(key, sid_string, timeout); SAFE_FREE(key); return ret; } Loading @@ -155,22 +164,26 @@ BOOL trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid, BOOL trustdom_cache_fetch(const char* name, DOM_SID* sid) { char *key, *value; char *key = NULL, *value = NULL; time_t timeout; /* init the cache */ if (!gencache_init()) return False; if (!gencache_init()) return False; /* exit now if null pointers were passed as they're required further */ if (!sid) return False; if (!sid) return False; /* prepare a key and get the value */ key = trustdom_cache_key(name); if (!key) return False; if (!key) return False; if (!gencache_get(key, &value, &timeout)) { DEBUG(5, ("no entry for trusted domain %s found.\n", name)); SAFE_FREE(key); SAFE_FREE(value); return False; } else { SAFE_FREE(key); Loading @@ -180,9 +193,11 @@ BOOL trustdom_cache_fetch(const char* name, DOM_SID* sid) /* convert ip string representation into in_addr structure */ if(! string_to_sid(sid, value)) { sid = NULL; SAFE_FREE(value); return False; } SAFE_FREE(value); return True; } Loading @@ -193,7 +208,7 @@ BOOL trustdom_cache_fetch(const char* name, DOM_SID* sid) uint32 trustdom_cache_fetch_timestamp( void ) { char *value; char *value = NULL; time_t timeout; uint32 timestamp; Loading @@ -203,11 +218,13 @@ uint32 trustdom_cache_fetch_timestamp( void ) if (!gencache_get(TDOMTSKEY, &value, &timeout)) { DEBUG(5, ("no timestamp for trusted domain cache located.\n")); SAFE_FREE(value); return 0; } timestamp = atoi(value); SAFE_FREE(value); return timestamp; } Loading source3/param/loadparm.c +3 −0 Original line number Diff line number Diff line Loading @@ -1447,6 +1447,7 @@ static void init_globals(void) a large number of sites (tridge) */ Globals.bHostnameLookups = False; str_list_free(&Globals.szPassdbBackend); #ifdef WITH_LDAP_SAMCONFIG string_set(&Globals.szLdapServer, "localhost"); Globals.ldap_port = 636; Loading Loading @@ -2517,6 +2518,7 @@ static void copy_service(service * pserviceDest, service * pserviceSource, BOOL strupper_m(*(char **)dest_ptr); break; case P_LIST: str_list_free((char ***)dest_ptr); str_list_copy((char ***)dest_ptr, *(const char ***)src_ptr); break; default: Loading Loading @@ -2748,6 +2750,7 @@ static BOOL handle_netbios_scope(int snum, const char *pszParmValue, char **ptr) static BOOL handle_netbios_aliases(int snum, const char *pszParmValue, char **ptr) { str_list_free(&Globals.szNetbiosAliases); Globals.szNetbiosAliases = str_list_make(pszParmValue, NULL); return set_netbios_aliases((const char **)Globals.szNetbiosAliases); } Loading source3/rpc_server/srv_pipe_hnd.c +1 −0 Original line number Diff line number Diff line Loading @@ -1118,6 +1118,7 @@ static BOOL close_internal_rpc_pipe_hnd(void *np_conn) data_blob_free(&p->session_key); delete_nt_token(&p->pipe_user.nt_user_token); data_blob_free(&p->session_key); SAFE_FREE(p->pipe_user.groups); DLIST_REMOVE(InternalPipes, p); Loading Loading
source3/auth/auth_util.c +3 −0 Original line number Diff line number Diff line Loading @@ -1236,6 +1236,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, info3->gids[i].g_rid)); SAFE_FREE(lgroupSIDs); SAFE_FREE(all_group_SIDs); free_server_info(server_info); return nt_status; Loading Loading @@ -1264,6 +1265,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, if ( !NT_STATUS_IS_OK(nt_status) ) { DEBUG(4,("create_nt_user_token failed\n")); SAFE_FREE(lgroupSIDs); SAFE_FREE(all_group_SIDs); free_server_info(server_info); return nt_status; Loading @@ -1271,6 +1273,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, (*server_info)->ptok = token; SAFE_FREE(lgroupSIDs); SAFE_FREE(all_group_SIDs); /* ensure we are never given NULL session keys */ Loading
source3/auth/auth_winbind.c +2 −3 Original line number Diff line number Diff line Loading @@ -127,9 +127,7 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context, if (result == NSS_STATUS_SUCCESS && response.extra_data) { if (NT_STATUS_IS_OK(nt_status)) { if (NT_STATUS_IS_OK(nt_status = get_info3_from_ndr(mem_ctx, &response, &info3))) { if (NT_STATUS_IS_OK(nt_status = get_info3_from_ndr(mem_ctx, &response, &info3))) { nt_status = make_server_info_info3(mem_ctx, user_info->internal_username.str, user_info->smb_name.str, user_info->domain.str, Loading @@ -141,6 +139,7 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context, nt_status = NT_STATUS_NO_LOGON_SERVERS; } SAFE_FREE(response.extra_data); return nt_status; } Loading
source3/libsmb/trustdom_cache.c +27 −10 Original line number Diff line number Diff line Loading @@ -114,12 +114,14 @@ BOOL trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid, { char *key, *alt_key; fstring sid_string; BOOL ret; /* * we use gecache call to avoid annoying debug messages * about initialised trustdom */ if (!gencache_init()) return False; if (!gencache_init()) return False; DEBUG(5, ("trustdom_store: storing SID %s of domain %s\n", sid_string_static(sid), name)); Loading @@ -134,11 +136,18 @@ BOOL trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid, * try to put the names in the cache */ if (alt_key) { return (gencache_set(alt_key, sid_string, timeout) && gencache_set(key, sid_string, timeout)); ret = gencache_set(alt_key, sid_string, timeout); if ( ret ) { ret = gencache_set(key, sid_string, timeout); } SAFE_FREE(alt_key); SAFE_FREE(key); return ret; } return gencache_set(key, sid_string, timeout); ret = gencache_set(key, sid_string, timeout); SAFE_FREE(key); return ret; } Loading @@ -155,22 +164,26 @@ BOOL trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid, BOOL trustdom_cache_fetch(const char* name, DOM_SID* sid) { char *key, *value; char *key = NULL, *value = NULL; time_t timeout; /* init the cache */ if (!gencache_init()) return False; if (!gencache_init()) return False; /* exit now if null pointers were passed as they're required further */ if (!sid) return False; if (!sid) return False; /* prepare a key and get the value */ key = trustdom_cache_key(name); if (!key) return False; if (!key) return False; if (!gencache_get(key, &value, &timeout)) { DEBUG(5, ("no entry for trusted domain %s found.\n", name)); SAFE_FREE(key); SAFE_FREE(value); return False; } else { SAFE_FREE(key); Loading @@ -180,9 +193,11 @@ BOOL trustdom_cache_fetch(const char* name, DOM_SID* sid) /* convert ip string representation into in_addr structure */ if(! string_to_sid(sid, value)) { sid = NULL; SAFE_FREE(value); return False; } SAFE_FREE(value); return True; } Loading @@ -193,7 +208,7 @@ BOOL trustdom_cache_fetch(const char* name, DOM_SID* sid) uint32 trustdom_cache_fetch_timestamp( void ) { char *value; char *value = NULL; time_t timeout; uint32 timestamp; Loading @@ -203,11 +218,13 @@ uint32 trustdom_cache_fetch_timestamp( void ) if (!gencache_get(TDOMTSKEY, &value, &timeout)) { DEBUG(5, ("no timestamp for trusted domain cache located.\n")); SAFE_FREE(value); return 0; } timestamp = atoi(value); SAFE_FREE(value); return timestamp; } Loading
source3/param/loadparm.c +3 −0 Original line number Diff line number Diff line Loading @@ -1447,6 +1447,7 @@ static void init_globals(void) a large number of sites (tridge) */ Globals.bHostnameLookups = False; str_list_free(&Globals.szPassdbBackend); #ifdef WITH_LDAP_SAMCONFIG string_set(&Globals.szLdapServer, "localhost"); Globals.ldap_port = 636; Loading Loading @@ -2517,6 +2518,7 @@ static void copy_service(service * pserviceDest, service * pserviceSource, BOOL strupper_m(*(char **)dest_ptr); break; case P_LIST: str_list_free((char ***)dest_ptr); str_list_copy((char ***)dest_ptr, *(const char ***)src_ptr); break; default: Loading Loading @@ -2748,6 +2750,7 @@ static BOOL handle_netbios_scope(int snum, const char *pszParmValue, char **ptr) static BOOL handle_netbios_aliases(int snum, const char *pszParmValue, char **ptr) { str_list_free(&Globals.szNetbiosAliases); Globals.szNetbiosAliases = str_list_make(pszParmValue, NULL); return set_netbios_aliases((const char **)Globals.szNetbiosAliases); } Loading
source3/rpc_server/srv_pipe_hnd.c +1 −0 Original line number Diff line number Diff line Loading @@ -1118,6 +1118,7 @@ static BOOL close_internal_rpc_pipe_hnd(void *np_conn) data_blob_free(&p->session_key); delete_nt_token(&p->pipe_user.nt_user_token); data_blob_free(&p->session_key); SAFE_FREE(p->pipe_user.groups); DLIST_REMOVE(InternalPipes, p); Loading