case 2:
{
fstring group_name;
- enum SID_NAME_USE type;
+ NTSTATUS status;
/* We currently do not support renaming groups in the
the BUILTIN domain. Refer to util_builtin.c to understand
or local group */
fstr_sprintf( group_name, "%s\\%s", global_myname(), info.acct_name );
- if ( lookup_name( p->mem_ctx, group_name, 0, NULL, NULL, NULL, &type) ) {
- if ( type == SID_NAME_USER ) {
- return NT_STATUS_USER_EXISTS;
- }
-
- return NT_STATUS_ALIAS_EXISTS;
- }
+ status = can_create( p->mem_ctx, group_name );
+ if ( !NT_STATUS_IS_OK( status ) )
+ return status;
break;
}
case 3: