if (*add_script) {
int add_ret;
- all_string_sub(add_script, "%u", account, sizeof(account));
+ all_string_sub(add_script, "%u", account, sizeof(add_script));
add_ret = smbrun(add_script,NULL);
DEBUG(3,("_samr_create_user: Running the command `%s' gave %d\n", add_script, add_ret));
}
{
int i;
- if ((*num) >= groups_max())
- return;
-
for (i=0; i<*num; i++) {
if ((*uids)[i] == uid)
return;
/* Secondary group members */
- gr = grp->gr_mem;
- while ((*gr != NULL) && ((*gr)[0] != '\0')) {
+ for (gr = grp->gr_mem; (*gr != NULL) && ((*gr)[0] != '\0'); gr += 1) {
struct passwd *pw = getpwnam(*gr);
if (pw == NULL)
continue;
-
add_uid_to_array_unique(pw->pw_uid, uids, num);
-
- gr += 1;
}
winbind_on();
pstrcpy(del_script, lp_deluser_script());
if (! *del_script)
return -1;
- all_string_sub(del_script, "%u", unix_user, sizeof(pstring));
+ all_string_sub(del_script, "%u", unix_user, sizeof(del_script));
ret = smbrun(del_script,NULL);
DEBUG(3,("smb_delete_user: Running the command `%s' gave %d\n",del_script,ret));