diff options
author | Luke Leighton <lkcl@samba.org> | 1998-12-07 17:23:48 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1998-12-07 17:23:48 +0000 |
commit | b8175702ef61b8b37b078f38e81452c00a5e2986 (patch) | |
tree | 5b9a750975a0c88e16be08d40282ca07523c110a /source/groupdb/aliasdb.c | |
parent | 7e9b687de7fbb34a2736030dab31a9df73a75073 (diff) | |
download | samba-b8175702ef61b8b37b078f38e81452c00a5e2986.tar.gz samba-b8175702ef61b8b37b078f38e81452c00a5e2986.tar.xz samba-b8175702ef61b8b37b078f38e81452c00a5e2986.zip |
- lib/unix_sec_ctxt.c
attempt at taking lib/uid.c and getting a unix security context
change module that is independent of "cnums" and "snums".
a security context is needed for pipes, not just IPC$ or other
services.
- group database API
added add_group/alias_member, del_group/alias_member,
del_group/alias_entry functions. del_builtin_entry() is
deliberately set to NULL to cause an exception, you cannot
delete builtin aliases.
- parse_lsa.c srv_lsa.c
fixed lookup_names code, it was a load of trash and didn't do
anything.
- cmd_samr.c rpcclient.c srv_samr.c
added "deletegroup", "deletealias", "delaliasmem", "delgroupmem",
"addgroupmem", "addaliasmem", "createalias", "creategroup", to
both client and server code.
server code calls into unix stubs right now, which don't actually
do anything. the only instance where they are expected to do
anything is in appliance mode NOT even in the ldap code or anything.
client code modified to call samr_lookup_names() for group code
(because we can) and lsa_lookup_names() for alias code (because
we have to).
- srv_lookup.c
oops, lookup on unsplit name, we got lookup on DOMAIN, DOMAIN\name
instead of DOMAIN, name.
Diffstat (limited to 'source/groupdb/aliasdb.c')
-rw-r--r-- | source/groupdb/aliasdb.c | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/source/groupdb/aliasdb.c b/source/groupdb/aliasdb.c index 011eee0f3dd..b787012b4d2 100644 --- a/source/groupdb/aliasdb.c +++ b/source/groupdb/aliasdb.c @@ -348,11 +348,25 @@ LOCAL_GRP *getaliasent(void *vp, LOCAL_GRP_MEMBER **mem, int *num_mem) /************************************************************************ Routine to add an entry to the alias database file. + on entry, the entry is added by name. + on exit, the RID is expected to have been set. *************************************************************************/ - -BOOL add_alias_entry(LOCAL_GRP *newals) +BOOL add_alias_entry(LOCAL_GRP *newgrp) +{ + BOOL ret; + if (newgrp->rid != 0xffffffff) { - return aldb_ops->add_alias_entry(newals); + DEBUG(0,("add_alias_entry - RID must be 0xffffffff, \ +database instance is responsible for allocating the RID, not you.\n")); + return False; + } + ret = aldb_ops->add_alias_entry(newgrp); + if (newgrp->rid == 0xffffffff) + { + DEBUG(0,("add_alias_entry - RID has not been set by database\n")); + return False; + } + return ret; } /************************************************************************ @@ -366,6 +380,29 @@ BOOL mod_alias_entry(LOCAL_GRP* als) } /************************************************************************ + Routine to delete alias database entry matching by rid. +************************************************************************/ +BOOL del_alias_entry(uint32 rid) +{ + return aldb_ops->del_alias_entry(rid); +} + +/************************************************************************ + Routine to add a member to an entry in the alias database file. +*************************************************************************/ +BOOL add_alias_member(uint32 rid, DOM_SID *member_sid) +{ + return aldb_ops->add_alias_member(rid, member_sid); +} + +/************************************************************************ + Routine to delete a member from an entry in the alias database file. +*************************************************************************/ +BOOL del_alias_member(uint32 rid, DOM_SID *member_sid) +{ + return aldb_ops->del_alias_member(rid, member_sid); +} +/************************************************************************ Routine to search alias database by name. *************************************************************************/ |