+2002-05-22 Pierre Humblet <pierre.humblet@ieee.org>
+
+ * security.cc (create_token): Call __sec_user() instead of
+ sec_user() to remove dependence on allow_ntsec. Verify that
+ the returned sd is non-null.
+
2002-05-25 Robert Collins <rbtcollins@hotmail.com>
* gmon.c (fake_sbrk): Correctly return -1 on failed malloc's.
else
{
/* Set security descriptor and primary group */
- psa = sec_user (sa_buf, usersid);
- if (!SetSecurityDescriptorGroup (
- (PSECURITY_DESCRIPTOR) psa->lpSecurityDescriptor,
- special_pgrp?pgrpsid:well_known_null_sid, FALSE))
+ psa = __sec_user (sa_buf, usersid, TRUE);
+ if (psa->lpSecurityDescriptor &&
+ !SetSecurityDescriptorGroup (
+ (PSECURITY_DESCRIPTOR) psa->lpSecurityDescriptor,
+ special_pgrp?pgrpsid:well_known_null_sid, FALSE))
debug_printf ("SetSecurityDescriptorGroup %E");
/* Convert to primary token. */
if (!DuplicateTokenEx (token, MAXIMUM_ALLOWED, psa,