#define DESIRED_ACCESS_PIPE 0x2019f
/* Generic access masks & rights. */
-#define SPECIFIC_RIGHTS_MASK 0x00FFFFL
-#define STANDARD_RIGHTS_MASK 0xFF0000L
#define DELETE_ACCESS (1L<<16) /* 0x00010000 */
#define READ_CONTROL_ACCESS (1L<<17) /* 0x00020000 */
#define WRITE_DAC_ACCESS (1L<<18) /* 0x00040000 */
return NT_STATUS_INVALID_PARAMETER;
}
- if (!NT_STATUS_IS_OK(status = sam_get_domain_by_sid(st->context, st->token, DOMAIN_ALL_ACCESS, &sid, &domain))) {
+ if (!NT_STATUS_IS_OK(status = sam_get_domain_by_sid(st->context, st->token, GENERIC_RIGHTS_DOMAIN_ALL_ACCESS, &sid, &domain))) {
printf("sam_get_domain_by_sid failed\n");
return status;
}
return NT_STATUS_INVALID_PARAMETER;
}
- if (!NT_STATUS_IS_OK(status = sam_get_account_by_sid(st->context, st->token, USER_ALL_ACCESS, &sid, &account))) {
+ if (!NT_STATUS_IS_OK(status = sam_get_account_by_sid(st->context, st->token, GENERIC_RIGHTS_USER_ALL_ACCESS, &sid, &account))) {
printf("context_sam_get_account_by_sid failed: %s\n", nt_errstr(status));
return status;
}
}
- if (!NT_STATUS_IS_OK(status = sam_get_account_by_name(st->context, st->token, USER_ALL_ACCESS, argv[1], argv[2], &account))) {
+ if (!NT_STATUS_IS_OK(status = sam_get_account_by_name(st->context, st->token, GENERIC_RIGHTS_USER_ALL_ACCESS, argv[1], argv[2], &account))) {
printf("context_sam_get_account_by_sid failed: %s\n", nt_errstr(status));
return status;
}