1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-31 20:22:15 +03:00

syncing up printing code with SAMBA_2_2 (already done some merges

in the reverse).

  * add in new printer change notify code from SAMBA_2_2

  * add in se_map_standard() from 2.2 in _spoolss_open_printer_ex()

  * sync up the _print_queue_struct in smb.h (why did someone change the
    user/file names in fs_user/fs_file (or vice-versa) ? )

  * sync up some cli_spoolss_XXX functions
This commit is contained in:
Gerald Carter
-
parent 9c8de8c6cf
commit 5760315c1d
13 changed files with 1067 additions and 369 deletions

View File

@ -193,6 +193,31 @@ void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping)
}
}
/* Map standard access rights to object specific rights. This technique is
used to give meaning to assigning read, write, execute and all access to
objects. Each type of object has its own mapping of standard to object
specific access rights. */
void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping)
{
uint32 old_mask = *access_mask;
if (*access_mask & READ_CONTROL_ACCESS) {
*access_mask &= ~READ_CONTROL_ACCESS;
*access_mask |= mapping->std_read;
}
if (*access_mask & (DELETE_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS|SYNCHRONIZE_ACCESS)) {
*access_mask &= ~(DELETE_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS|SYNCHRONIZE_ACCESS);
*access_mask |= mapping->std_all;
}
if (old_mask != *access_mask) {
DEBUG(10, ("se_map_standard(): mapped mask 0x%08x to 0x%08x\n",
old_mask, *access_mask));
}
}
/*****************************************************************************
Check access rights of a user against a security descriptor. Look at
each ACE in the security descriptor until an access denied ACE denies