Changeset 228 for branches/samba-3.2.x/source/rpc_server/srv_lsa_nt.c
- Timestamp:
- May 26, 2009, 9:44:50 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.2.x/source/rpc_server/srv_lsa_nt.c
r138 r228 435 435 436 436 if(!se_access_check(psd, p->pipe_user.nt_user_token, des_access, &acc_granted, &status)) { 437 if ( geteuid() != 0) {437 if () { 438 438 return status; 439 439 } … … 1531 1531 account_pol.tdb was already opened as root, this is all we have */ 1532 1532 1533 if ( !nt_token_check_domain_rid( p->pipe_user.nt_user_token, DOMAIN_GROUP_RID_ADMINS ) ) 1533 if ( p->pipe_user.ut.uid != sec_initial_uid() 1534 && !nt_token_check_domain_rid( p->pipe_user.nt_user_token, DOMAIN_GROUP_RID_ADMINS ) ) 1534 1535 return NT_STATUS_ACCESS_DENIED; 1535 1536 … … 1617 1618 return NT_STATUS_INVALID_HANDLE; 1618 1619 1620 1621 1622 1619 1623 if ( !get_privileges_for_sids( &mask, &info->sid, 1 ) ) 1620 1624 return NT_STATUS_OBJECT_NAME_NOT_FOUND; … … 1677 1681 return NT_STATUS_INVALID_HANDLE; 1678 1682 1683 1684 1685 1679 1686 if (!lookup_sid(p->mem_ctx, &info->sid, NULL, NULL, NULL)) 1680 1687 return NT_STATUS_ACCESS_DENIED; … … 1711 1718 account_pol.tdb was already opened as root, this is all we have */ 1712 1719 1713 if ( !nt_token_check_domain_rid( p->pipe_user.nt_user_token, DOMAIN_GROUP_RID_ADMINS ) ) 1720 if ( p->pipe_user.ut.uid != sec_initial_uid() 1721 && !nt_token_check_domain_rid( p->pipe_user.nt_user_token, DOMAIN_GROUP_RID_ADMINS ) ) 1714 1722 return NT_STATUS_ACCESS_DENIED; 1715 1723 … … 1820 1828 if (!(handle->access & LSA_POLICY_VIEW_LOCAL_INFORMATION)) 1821 1829 return NT_STATUS_ACCESS_DENIED; 1822 1823 1830 1824 1831 switch (r->in.sec_info) { … … 2079 2086 return NT_STATUS_INVALID_HANDLE; 2080 2087 2088 2089 2090 2081 2091 /* according to an NT4 PDC, you can add privileges to SIDs even without 2082 2092 call_lsa_create_account() first. And you can use any arbitrary SID. */ … … 2120 2130 if (!find_policy_by_hnd(p, r->in.handle, (void **)(void *)&info)) 2121 2131 return NT_STATUS_INVALID_HANDLE; 2132 2133 2134 2122 2135 2123 2136 name = r->in.name->string;
Note:
See TracChangeset
for help on using the changeset viewer.
