summaryrefslogtreecommitdiff
path: root/source3/utils/net_groupmap.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-08-08 19:29:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:36 -0500
commite1e62d89999629d41cc2b66b12eb37ce190d5db0 (patch)
treebb9732660ea085b6f13b1ddfa7140243e4624410 /source3/utils/net_groupmap.c
parentbe72e2de59b984bccd2e84e658bbbef379e6f13c (diff)
downloadsamba-e1e62d89999629d41cc2b66b12eb37ce190d5db0.tar.gz
samba-e1e62d89999629d41cc2b66b12eb37ce190d5db0.tar.bz2
samba-e1e62d89999629d41cc2b66b12eb37ce190d5db0.zip
r17463: A bit of cleanup work:
Remove some unused code: pdb_find_alias is not used anymore, and nobody I think has ever used the pdb_nop operations for group mapping. smbpasswd and tdb use the default ones and ldap has its own. Make the functions pdb_getgr* return NTSTATUS instead of BOOL. Nobody right now really makes use of it, but it feels wrong to throw away information so early. Volker (This used to be commit f9856f6490fe44fdba97ea86062237d8c74d4bdc)
Diffstat (limited to 'source3/utils/net_groupmap.c')
-rw-r--r--source3/utils/net_groupmap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/utils/net_groupmap.c b/source3/utils/net_groupmap.c
index 3865382c92..10ea8cce2a 100644
--- a/source3/utils/net_groupmap.c
+++ b/source3/utils/net_groupmap.c
@@ -66,7 +66,7 @@ static BOOL get_sid_from_input(DOM_SID *sid, char *input)
if (StrnCaseCmp( input, "S-", 2)) {
/* Perhaps its the NT group name? */
- if (!pdb_getgrnam(&map, input)) {
+ if (!NT_STATUS_IS_OK(pdb_getgrnam(&map, input))) {
printf("NT Group %s doesn't exist in mapping DB\n", input);
return False;
} else {
@@ -153,7 +153,7 @@ static int net_groupmap_list(int argc, const char **argv)
}
/* Get the current mapping from the database */
- if(!pdb_getgrsid(&map, &sid)) {
+ if(!NT_STATUS_IS_OK(pdb_getgrsid(&map, &sid))) {
d_fprintf(stderr, "Failure to local group SID in the database\n");
return -1;
}
@@ -265,7 +265,7 @@ static int net_groupmap_add(int argc, const char **argv)
{
GROUP_MAP map;
- if (pdb_getgrgid(&map, gid)) {
+ if (NT_STATUS_IS_OK(pdb_getgrgid(&map, gid))) {
d_printf("Unix group %s already mapped to SID %s\n",
unixgrp, sid_string_static(&map.sid));
return -1;
@@ -404,7 +404,7 @@ static int net_groupmap_modify(int argc, const char **argv)
}
/* Get the current mapping from the database */
- if(!pdb_getgrsid(&map, &sid)) {
+ if(!NT_STATUS_IS_OK(pdb_getgrsid(&map, &sid))) {
d_fprintf(stderr, "Failure to local group SID in the database\n");
return -1;
}
@@ -533,13 +533,13 @@ static int net_groupmap_set(int argc, const char **argv)
}
}
- have_map = pdb_getgrnam(&map, ntgroup);
+ have_map = NT_STATUS_IS_OK(pdb_getgrnam(&map, ntgroup));
if (!have_map) {
DOM_SID sid;
have_map = ( (strncmp(ntgroup, "S-", 2) == 0) &&
string_to_sid(&sid, ntgroup) &&
- pdb_getgrsid(&map, &sid) );
+ NT_STATUS_IS_OK(pdb_getgrsid(&map, &sid)) );
}
if (!have_map) {