summaryrefslogtreecommitdiff
path: root/source3/groupdb
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2005-02-07 18:20:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:55:35 -0500
commit5f54cc9bd3fa76e62926de0670f832f7b0e3739d (patch)
tree916e513b439140dbe88735721d60730bae3ce942 /source3/groupdb
parent3842d6c205b8ec8606d4086a59f9fe7a5d5b6435 (diff)
downloadsamba-5f54cc9bd3fa76e62926de0670f832f7b0e3739d.tar.gz
samba-5f54cc9bd3fa76e62926de0670f832f7b0e3739d.tar.bz2
samba-5f54cc9bd3fa76e62926de0670f832f7b0e3739d.zip
r5264: Log with loglevel 0 when account-administration scripts fail.
Guenther (This used to be commit 3d391ef149639750db376b05528a27422f8a3321)
Diffstat (limited to 'source3/groupdb')
-rw-r--r--source3/groupdb/mapping.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c
index e574a7cf20..1c29cc77c4 100644
--- a/source3/groupdb/mapping.c
+++ b/source3/groupdb/mapping.c
@@ -975,7 +975,7 @@ int smb_create_group(char *unix_group, gid_t *new_gid)
pstrcpy(add_script, lp_addgroup_script());
pstring_sub(add_script, "%g", unix_group);
ret = smbrun(add_script, (new_gid!=NULL) ? &fd : NULL);
- DEBUG(3,("smb_create_group: Running the command `%s' gave %d\n",add_script,ret));
+ DEBUG(ret ? 0 : 3,("smb_create_group: Running the command `%s' gave %d\n",add_script,ret));
if (ret != 0)
return ret;
@@ -1022,7 +1022,7 @@ int smb_delete_group(char *unix_group)
pstrcpy(del_script, lp_delgroup_script());
pstring_sub(del_script, "%g", unix_group);
ret = smbrun(del_script,NULL);
- DEBUG(3,("smb_delete_group: Running the command `%s' gave %d\n",del_script,ret));
+ DEBUG(ret ? 0 : 3,("smb_delete_group: Running the command `%s' gave %d\n",del_script,ret));
return ret;
}
@@ -1050,7 +1050,7 @@ int smb_set_primary_group(const char *unix_group, const char* unix_user)
all_string_sub(add_script, "%g", unix_group, sizeof(add_script));
all_string_sub(add_script, "%u", unix_user, sizeof(add_script));
ret = smbrun(add_script,NULL);
- DEBUG(3,("smb_set_primary_group: "
+ DEBUG(ret ? 0 : 3,("smb_set_primary_group: "
"Running the command `%s' gave %d\n",add_script,ret));
return ret;
}
@@ -1082,7 +1082,7 @@ int smb_add_user_group(char *unix_group, char *unix_user)
pstring_sub(add_script, "%g", unix_group);
pstring_sub(add_script, "%u", unix_user);
ret = smbrun(add_script,NULL);
- DEBUG(3,("smb_add_user_group: Running the command `%s' gave %d\n",add_script,ret));
+ DEBUG(ret ? 0 : 3,("smb_add_user_group: Running the command `%s' gave %d\n",add_script,ret));
return ret;
}
@@ -1113,7 +1113,7 @@ int smb_delete_user_group(const char *unix_group, const char *unix_user)
pstring_sub(del_script, "%g", unix_group);
pstring_sub(del_script, "%u", unix_user);
ret = smbrun(del_script,NULL);
- DEBUG(3,("smb_delete_user_group: Running the command `%s' gave %d\n",del_script,ret));
+ DEBUG(ret ? 0 : 3,("smb_delete_user_group: Running the command `%s' gave %d\n",del_script,ret));
return ret;
}