summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorDavid O'Neill <dmo@samba.org>2001-01-10 16:05:41 +0000
committerDavid O'Neill <dmo@samba.org>2001-01-10 16:05:41 +0000
commit17ab0c2acc1321d8228f604d207deacb1bdd3575 (patch)
treede6b724479b07b383a4ae113968f6dc0855e2451 /source3/rpc_server
parent615af12cf2171001bc7da716cea25eab57ec3f4c (diff)
downloadsamba-17ab0c2acc1321d8228f604d207deacb1bdd3575.tar.gz
samba-17ab0c2acc1321d8228f604d207deacb1bdd3575.tar.bz2
samba-17ab0c2acc1321d8228f604d207deacb1bdd3575.zip
Changes from APPLIANCE_HEAD:
source/include/proto.h source/param/loadparm.c source/passdb/passdb.c source/rpc_server/srv_samr.c - add support for "hide local users" option to HEAD. (This used to be commit 44dc339fe757b2b5578b30e74aad8c1b12c23f5f)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_samr.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_samr.c b/source3/rpc_server/srv_samr.c
index 352852038a..b0991f7627 100644
--- a/source3/rpc_server/srv_samr.c
+++ b/source3/rpc_server/srv_samr.c
@@ -210,6 +210,10 @@ static BOOL get_passwd_entries(SAM_USER_INFO_21 *pw_buf,
(*num_entries) = 0;
(*total_entries) = 0;
+ /* Skip all this stuff if we're in appliance mode */
+
+ if (lp_hide_local_users()) goto done;
+
if (pw_buf == NULL) return False;
if (current_idx == 0) {
@@ -340,6 +344,7 @@ static BOOL get_passwd_entries(SAM_USER_INFO_21 *pw_buf,
mapped_idx = 0;
}
+done:
return (*num_entries) > 0;
}
@@ -759,14 +764,16 @@ static BOOL samr_reply_enum_dom_aliases(SAMR_Q_ENUM_DOM_ALIASES *q_u,
if (strequal(sid_str, "S-1-5-32"))
{
char *name;
- while (num_entries < MAX_SAM_ENTRIES && ((name = builtin_alias_rids[num_entries].name) != NULL))
+ while (!lp_hide_local_users() &&
+ num_entries < MAX_SAM_ENTRIES &&
+ ((name = builtin_alias_rids[num_entries].name) != NULL))
{
init_unistr2(&(pass[num_entries].uni_user_name), name, strlen(name)+1);
pass[num_entries].user_rid = builtin_alias_rids[num_entries].rid;
num_entries++;
}
}
- else if (strequal(sid_str, sam_sid_str))
+ else if (strequal(sid_str, sam_sid_str) && !lp_hide_local_users())
{
char *name;
char *sep;