summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_group.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-05-31 02:23:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:57:01 -0500
commit450e8d5749504f8392c0cfe8b79218f03b88076a (patch)
treecef9fa5ebb4909a57ad02af6416b94182c6b874d /source3/nsswitch/winbindd_group.c
parenta3f4c365171097eaa615b390d74a90b9345a3973 (diff)
downloadsamba-450e8d5749504f8392c0cfe8b79218f03b88076a.tar.gz
samba-450e8d5749504f8392c0cfe8b79218f03b88076a.tar.bz2
samba-450e8d5749504f8392c0cfe8b79218f03b88076a.zip
r7130: remove 'winbind enable local accounts' code from the 3.0 tree
(This used to be commit 318c3db4cb1c85be40b2f812f781bcf5f1da5c19)
Diffstat (limited to 'source3/nsswitch/winbindd_group.c')
-rw-r--r--source3/nsswitch/winbindd_group.c66
1 files changed, 1 insertions, 65 deletions
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c
index 506ed12cbd..c431e32cc1 100644
--- a/source3/nsswitch/winbindd_group.c
+++ b/source3/nsswitch/winbindd_group.c
@@ -31,34 +31,6 @@ extern BOOL opt_nocache;
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
-/*********************************************************************
-*********************************************************************/
-
-static int gr_mem_buffer( char **buffer, char **members, int num_members )
-{
- int i;
- int len = 0;
- int idx = 0;
-
- if ( num_members == 0 ) {
- *buffer = NULL;
- return 0;
- }
-
- for ( i=0; i<num_members; i++ )
- len += strlen(members[i])+1;
-
- *buffer = SMB_XMALLOC_ARRAY(char, len);
- for ( i=0; i<num_members; i++ ) {
- snprintf( &(*buffer)[idx], len-idx, "%s,", members[i]);
- idx += strlen(members[i])+1;
- }
- /* terminate with NULL */
- (*buffer)[len-1] = '\0';
-
- return len;
-}
-
/***************************************************************
Empty static struct for negative caching.
****************************************************************/
@@ -229,7 +201,6 @@ done:
enum winbindd_result winbindd_getgrnam(struct winbindd_cli_state *state)
{
DOM_SID group_sid;
- WINBINDD_GR *grp;
struct winbindd_domain *domain;
enum SID_NAME_USE name_type;
fstring name_domain, name_group;
@@ -251,26 +222,7 @@ enum winbindd_result winbindd_getgrnam(struct winbindd_cli_state *state)
parse_domain_user(tmp, name_domain, name_group);
- /* if no domain or our local domain, then do a local tdb search */
-
- if ( (!*name_domain || strequal(name_domain, get_global_sam_name())) &&
- ((grp = wb_getgrnam(name_group)) != NULL) ) {
-
- char *buffer = NULL;
-
- memcpy( &state->response.data.gr, grp, sizeof(WINBINDD_GR) );
-
- gr_mem_len = gr_mem_buffer( &buffer, grp->gr_mem, grp->num_gr_mem );
-
- state->response.data.gr.gr_mem_ofs = 0;
- state->response.length += gr_mem_len;
- state->response.extra_data = buffer; /* give the memory away */
-
- return WINBINDD_OK;
- }
-
- /* if no domain or our local domain and no local tdb group, default to
- * our local domain for aliases */
+ /* if no domain or our local domain, default to our local domain for aliases */
if ( !*name_domain || strequal(name_domain, get_global_sam_name()) ) {
fstrcpy(name_domain, get_global_sam_name());
@@ -337,7 +289,6 @@ enum winbindd_result winbindd_getgrnam(struct winbindd_cli_state *state)
enum winbindd_result winbindd_getgrgid(struct winbindd_cli_state *state)
{
struct winbindd_domain *domain;
- WINBINDD_GR *grp;
DOM_SID group_sid;
enum SID_NAME_USE name_type;
fstring dom_name;
@@ -354,21 +305,6 @@ enum winbindd_result winbindd_getgrgid(struct winbindd_cli_state *state)
(state->request.data.gid > server_state.gid_high))
return WINBINDD_ERROR;
- /* alway try local tdb lookup first */
- if ( ( grp=wb_getgrgid(state->request.data.gid)) != NULL ) {
- char *buffer = NULL;
-
- memcpy( &state->response.data.gr, grp, sizeof(WINBINDD_GR) );
-
- gr_mem_len = gr_mem_buffer( &buffer, grp->gr_mem, grp->num_gr_mem );
-
- state->response.data.gr.gr_mem_ofs = 0;
- state->response.length += gr_mem_len;
- state->response.extra_data = buffer; /* give away the memory */
-
- return WINBINDD_OK;
- }
-
/* Get rid from gid */
if (!NT_STATUS_IS_OK(idmap_gid_to_sid(&group_sid, state->request.data.gid))) {
DEBUG(1, ("could not convert gid %lu to rid\n",