diff options
author | Jeremy Allison <jra@samba.org> | 2001-11-27 06:28:06 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-11-27 06:28:06 +0000 |
commit | 064b3e7da7adfae06eae459e54ae0853924a4e4b (patch) | |
tree | a0328dcc8f915bf4b612043f5389f899486239d2 /source3/nsswitch | |
parent | 3dddd416e8897a2b8fa9afeee1f22bb57aeeede8 (diff) | |
download | samba-064b3e7da7adfae06eae459e54ae0853924a4e4b.tar.gz samba-064b3e7da7adfae06eae459e54ae0853924a4e4b.tar.bz2 samba-064b3e7da7adfae06eae459e54ae0853924a4e4b.zip |
nsswitch/winbindd_group.c nsswitch/winbindd_user.c: formatting fixups.
smbd/open.c: Fix "delete on close" for directories.
Jeremy.
(This used to be commit 014b0973a3b3b9eb22cce3053171fa55f5c16a63)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r-- | source3/nsswitch/winbindd_group.c | 10 | ||||
-rw-r--r-- | source3/nsswitch/winbindd_user.c | 47 |
2 files changed, 29 insertions, 28 deletions
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c index 713c0e70b6..0063a19a72 100644 --- a/source3/nsswitch/winbindd_group.c +++ b/source3/nsswitch/winbindd_group.c @@ -174,7 +174,7 @@ static BOOL fill_grent_mem(struct winbindd_domain *domain, result = True; done: - talloc_destroy(mem_ctx); + talloc_destroy(mem_ctx); DEBUG(10, ("fill_grent_mem(): returning %d\n", result)); @@ -393,8 +393,8 @@ enum winbindd_result winbindd_setgrent(struct winbindd_cli_state *state) /* Create sam pipes for each domain we know about */ - if (domain_list == NULL) - get_domain_info(); + if (domain_list == NULL) + get_domain_info(); for (tmp = domain_list; tmp != NULL; tmp = tmp->next) { struct getent_state *domain_state; @@ -512,8 +512,8 @@ static BOOL get_sam_group_entries(struct getent_state *ent) SAFE_FREE(name_list); goto done; - } else - name_list = tnl; + } else + name_list = tnl; memcpy(&name_list[ent->num_sam_entries], sam_grp_entries, diff --git a/source3/nsswitch/winbindd_user.c b/source3/nsswitch/winbindd_user.c index 85abe9b587..5d317bdf94 100644 --- a/source3/nsswitch/winbindd_user.c +++ b/source3/nsswitch/winbindd_user.c @@ -145,10 +145,10 @@ enum winbindd_result winbindd_getpwnam_from_user(struct winbindd_cli_state from the winbind_lookup_by_name() call and use it in a winbind_lookup_userinfo() */ - if (!(mem_ctx = talloc_init())) { - DEBUG(1, ("out of memory\n")); - return WINBINDD_ERROR; - } + if (!(mem_ctx = talloc_init())) { + DEBUG(1, ("out of memory\n")); + return WINBINDD_ERROR; + } sid_split_rid(&user_sid, &user_rid); @@ -163,8 +163,8 @@ enum winbindd_result winbindd_getpwnam_from_user(struct winbindd_cli_state unistr2_to_ascii(gecos_name, &user_info->info.id21->uni_full_name, sizeof(gecos_name) - 1); - talloc_destroy(mem_ctx); - user_info = NULL; + talloc_destroy(mem_ctx); + user_info = NULL; /* Now take all this information and fill in a passwd structure */ @@ -239,10 +239,10 @@ enum winbindd_result winbindd_getpwnam_from_uid(struct winbindd_cli_state /* Get some user info */ - if (!(mem_ctx = talloc_init())) { - DEBUG(1, ("out of memory\n")); - return WINBINDD_ERROR; - } + if (!(mem_ctx = talloc_init())) { + DEBUG(1, ("out of memory\n")); + return WINBINDD_ERROR; + } if (!winbindd_lookup_userinfo(domain, mem_ctx, user_rid, &user_info)) { DEBUG(1, ("pwnam_from_uid(): error getting user info for " @@ -254,8 +254,8 @@ enum winbindd_result winbindd_getpwnam_from_uid(struct winbindd_cli_state unistr2_to_ascii(gecos_name, &user_info->info.id21->uni_full_name, sizeof(gecos_name) - 1); - talloc_destroy(mem_ctx); - user_info = NULL; + talloc_destroy(mem_ctx); + user_info = NULL; /* Resolve gid number */ @@ -540,7 +540,7 @@ enum winbindd_result winbindd_getpwent(struct winbindd_cli_state *state) /* No more domains */ if (!ent) - break; + break; } name_list = ent->sam_entries; @@ -599,20 +599,20 @@ enum winbindd_result winbindd_list_users(struct winbindd_cli_state *state) uint32 num_entries = 0, total_entries = 0; char *ted, *extra_data = NULL; int extra_data_len = 0; - TALLOC_CTX *mem_ctx; - enum winbindd_result rv = WINBINDD_ERROR; + TALLOC_CTX *mem_ctx; + enum winbindd_result rv = WINBINDD_ERROR; DEBUG(3, ("[%5d]: list users\n", state->pid)); - if (!(mem_ctx = talloc_init())) - return WINBINDD_ERROR; + if (!(mem_ctx = talloc_init())) + return WINBINDD_ERROR; /* Enumerate over trusted domains */ ctr.sam.info1 = &info1; - if (domain_list == NULL) - get_domain_info(); + if (domain_list == NULL) + get_domain_info(); for (domain = domain_list; domain; domain = domain->next) { NTSTATUS status; @@ -647,9 +647,9 @@ enum winbindd_result winbindd_list_users(struct winbindd_cli_state *state) if (!ted) { DEBUG(0,("winbindd_list_users: failed to enlarge buffer!\n")); SAFE_FREE(extra_data); - goto done; + goto done; } else - extra_data = ted; + extra_data = ted; /* Pack user list into extra data fields */ @@ -693,7 +693,8 @@ enum winbindd_result winbindd_list_users(struct winbindd_cli_state *state) rv = WINBINDD_OK; done: - talloc_destroy(mem_ctx); - return rv; + talloc_destroy(mem_ctx); + + return rv; } |