if (*workstation_list) {
BOOL invalid_ws = True;
+ fstring tok;
const char *s = workstation_list;
+
+ const char *machine_name = talloc_asprintf(mem_ctx, "%s$", user_info->wksta_name.str);
+ if (machine_name == NULL)
+ return NT_STATUS_NO_MEMORY;
- fstring tok;
while (next_token(&s, tok, ",", sizeof(tok))) {
DEBUG(10,("sam_account_ok: checking for workstation match %s and %s (len=%d)\n",
invalid_ws = False;
break;
}
+ if (tok[0] == '@') {
+ DEBUG(10,("sam_account_ok: checking for workstation %s in group: %s\n",
+ machine_name, tok + 1));
+ if (user_in_group_list(machine_name, tok + 1, NULL, 0)) {
+ invalid_ws = False;
+ break;
+ }
+ }
}
if (invalid_ws)