diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-02-13 17:08:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:10:06 -0500 |
commit | 301d51e13a1aa4e633e2da161b0dd260a8a499cd (patch) | |
tree | 7e8b9acef42b06f5ca2eac42f5b6403a035c8612 /source3/groupdb | |
parent | 3b67210eec560d0c79b625ac11acb940e29fe8e0 (diff) | |
download | samba-301d51e13a1aa4e633e2da161b0dd260a8a499cd.tar.gz samba-301d51e13a1aa4e633e2da161b0dd260a8a499cd.tar.bz2 samba-301d51e13a1aa4e633e2da161b0dd260a8a499cd.zip |
r13494: Merge the stuff I've done in head the last days.
Volker
(This used to be commit bb40e544de68f01a6e774753f508e69373b39899)
Diffstat (limited to 'source3/groupdb')
-rw-r--r-- | source3/groupdb/mapping.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c index 2790d47587..07116f41fb 100644 --- a/source3/groupdb/mapping.c +++ b/source3/groupdb/mapping.c @@ -157,26 +157,26 @@ static BOOL add_mapping_entry(GROUP_MAP *map, int flag) /**************************************************************************** initialise first time the mapping list ****************************************************************************/ -BOOL add_initial_entry(gid_t gid, const char *sid, enum SID_NAME_USE sid_name_use, const char *nt_name, const char *comment) +NTSTATUS add_initial_entry(gid_t gid, const char *sid, enum SID_NAME_USE sid_name_use, const char *nt_name, const char *comment) { GROUP_MAP map; if(!init_group_mapping()) { DEBUG(0,("failed to initialize group mapping\n")); - return(False); + return NT_STATUS_UNSUCCESSFUL; } map.gid=gid; if (!string_to_sid(&map.sid, sid)) { DEBUG(0, ("string_to_sid failed: %s", sid)); - return False; + return NT_STATUS_UNSUCCESSFUL; } map.sid_name_use=sid_name_use; fstrcpy(map.nt_name, nt_name); fstrcpy(map.comment, comment); - return NT_STATUS_IS_OK(pdb_add_group_mapping_entry(&map)); + return pdb_add_group_mapping_entry(&map); } /**************************************************************************** @@ -856,7 +856,7 @@ BOOL get_domain_group_from_sid(DOM_SID sid, GROUP_MAP *map) Create a UNIX group on demand. ****************************************************************************/ -int smb_create_group(char *unix_group, gid_t *new_gid) +int smb_create_group(const char *unix_group, gid_t *new_gid) { pstring add_script; int ret = -1; @@ -901,7 +901,7 @@ int smb_create_group(char *unix_group, gid_t *new_gid) Delete a UNIX group on demand. ****************************************************************************/ -int smb_delete_group(char *unix_group) +int smb_delete_group(const char *unix_group) { pstring del_script; int ret; @@ -947,7 +947,7 @@ int smb_set_primary_group(const char *unix_group, const char* unix_user) Add a user to a UNIX group. ****************************************************************************/ -int smb_add_user_group(char *unix_group, char *unix_user) +int smb_add_user_group(const char *unix_group, const char *unix_user) { pstring add_script; int ret; @@ -1122,8 +1122,7 @@ NTSTATUS pdb_default_create_alias(struct pdb_methods *methods, NTSTATUS pdb_default_delete_alias(struct pdb_methods *methods, const DOM_SID *sid) { - return pdb_delete_group_mapping_entry(*sid) ? - NT_STATUS_OK : NT_STATUS_ACCESS_DENIED; + return pdb_delete_group_mapping_entry(*sid); } NTSTATUS pdb_default_get_aliasinfo(struct pdb_methods *methods, |