1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00
Commit Graph

41 Commits

Author SHA1 Message Date
Andrew Tridgell
6891393b5d yipee! Finally put in the patch from Alexey Kotovich
<a.kotovich@sam-solutions.net> that adds the security decsriptor code
for ADS workstation accounts

thanks for your patience Cat, and thanks to Andrew Bartlett for
extensive reviews and suggestions about this code.
0001-01-01 00:00:00 +00:00
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
0001-01-01 00:00:00 +00:00
Tim Potter
9712d3f15a Renamed sid field in SEC_ACE to trustee to be more in line with MS's
definitions.
0001-01-01 00:00:00 +00:00
Tim Potter
2d0922b0ea Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. 0001-01-01 00:00:00 +00:00
Tim Potter
ce22267ec8 A collection of fixes/cleanups to the security descriptor code by
matt_zinkevicius@hp.com
0001-01-01 00:00:00 +00:00
Jeremy Allison
274c0f5028 Ensure we always have a valid pointer on unmarshalling an SD with zero
ace entries.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
89eaaafe7d Fixed bug introduced by changeover of security descriptor code from
malloc() to talloc().  Previously, creating an ACL containing zero ACEs
would return a non-NULL pointer to zero bytes of memory.  The talloc() code
would return a NULL pointer making the ACL a NULL ACL instead of an empty
one.  The difference is a NULL ACL allows all access and an empty ACL
denies all access.

We solve this by calling talloc(ctx, sizeof(SEC_ACE) * num_aces + 1).
Heh.
0001-01-01 00:00:00 +00:00
Jeremy Allison
14d5997dc8 Move to talloc control of SPOOL_XXX structs. Move to talloc control of
security descriptors and pointers. Syncup with 2.2 tree.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
94fdffb355 As prs_alloc_mem now zeros memory, remove superfluous memsets after it.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
5b38513cef Fixed duplicate free_sec_acl() call in free_sec_desc() function.
From "Richard Bollinger" <rabollinger@home.com>
0001-01-01 00:00:00 +00:00
David O'Neill
376601d17d Changes from APPLIANCE_HEAD:
testsuite/printing/psec.c
        - Use lock directory from smb.conf parameter when peeking at the
          ntdrivers.tdb file.
    source/rpc_parse/parse_sec.c
        - fix typo in debug message
    source/script/installbin.sh
        - create private directory as part of 'make install'.
    source/nsswitch/winbindd_cache.c
    source/nsswitch/winbindd_idmap.c
    source/passdb/secrets.c
    source/smbd/connection.c
        - always convert tdb key to unix code-page when generating.
    source/printing/nt_printing.c
        - always convert tdb key to unix code-page when generating.
        - don't prepend path to a filename that is NULL in
          add_a_printer_driver_3().
    source/rpc_server/srv_spoolss_nt.c
        - always convert tdb key to unix code-page when generating.
        - don't prepend server name to a path/filename that is NULL in the
          fill_printer_driver_info functions.
    source/printing/printing.c
        - always convert tdb key to unix code-page when generating.
        - move access check for print_queue_purge() outside of job delete
          loop.
    source/smbd/unix_acls.c
        - fix for setting ACLs (this got missed earlier)
    source/lib/messages.c
        - trivial sync with appliance_head
0001-01-01 00:00:00 +00:00
Jeremy Allison
26f873540c Merged Tim's fixes from appliance-head.
Jeremy.
0001-01-01 00:00:00 +00:00
David O'Neill
505a8a2277 Changes from APPLIANCE_HEAD:
- add some debugs for comparing two security descriptors.
      (source/rpc_parse/parse_sec.c)
0001-01-01 00:00:00 +00:00
Andrew Tridgell
9ec4b1fa48 no longer pass the type to make_sec_desc(), instead the type is
derived from the other arguments
0001-01-01 00:00:00 +00:00
Tim Potter
ae087bdf31 Merge of printer security descriptor, info level and printerdata
comparison changes from appliance branch.
0001-01-01 00:00:00 +00:00
Jeremy Allison
c55bcec817 Tidyup removing many of the 0xC0000000 | NT_STATUS_XXX stuff (only need NT_STATUS_XXX).
Removed IS_BITS_xxx macros as they were just reproducing "C" syntax in a more
obscure way.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
341d07c516 Cause printer SD's to be displayed correctly (full control).
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
8ef41f31c5 Fixing get/set of security descriptors.
Removed ugly hack for NT printing.
Fixed up tdb parse stuff memory leaks.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
b152d75ea6 sec_desc_size() needs to handle a null secdesc 0001-01-01 00:00:00 +00:00
Jeremy Allison
eba31e4e80 Back to building. Now to test with insure.
Added some frees needed to stop memory leaks.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
c2099cfb03 Getting back to a compilable state (not there yet but close).
Added patches for random -> sys_random.
Added set_effective_xxx patches for AFS code.
Memory allocation changes in spoolss code.
Jeremy.
0001-01-01 00:00:00 +00:00
Luke Leighton
f9f2a04fdb security descs in spoolss. needs parse_sec.c nttrans.c broken. 0001-01-01 00:00:00 +00:00
Andrew Tridgell
d178c00aae more merging
it is now at the stage that winbindd can compile in the head branch,
but not link
0001-01-01 00:00:00 +00:00
Jeremy Allison
f02999dbf7 acconfig.h configure configure.in: Added check for UT_SYSLEN for utmp code.
include/byteorder.h: Added alignment macros.
include/nameserv.h: Added defines for msg_type field options - from rfc1002.
lib/time.c: Typo fix.
lib/util_unistr.c: Updates from UNICODE branch.
printing/nt_printing.c: bzero -> memset.
smbd/connection.c: Added check for UT_SYSLEN for utmp code.

Other fixes : Rollback of unapproved commit from Luke.
Please *ask* next time before doing large changes to HEAD.

Jeremy.
0001-01-01 00:00:00 +00:00
Luke Leighton
cfaea90529 added the following message to all dce/rpc client/server code, except
the spoolss code (it's cut from TNG) and the smb-dce/rpc interface
code that jeremy has been working up to TNG-functionality.

i also want this message to go into SAMBA_2_0 and SAMBA_2_0_RELEASE,
because it is intolerable that potentially good modifications be made
to code that is going to be thrown away, and people waste their time
fixing bugs and adding enhancements that have already been carried
out already, up to two years ago in the TNG branch.

/*
 * THIS CODE IS OUT-OF-DATE BY TWO YEARS, IS LEGACY DESIGN AND VERY, VERY,
 * INCOMPLETE.  PLEASE DO NOT MAKE ANY FURTHER ENHANCEMENTS TO THIS CODE
 * UNLESS THEY ARE ALSO CARRIED OUT IN THE SAMBA_TNG BRANCH.
 *
 * PLEASE DO NOT TREAT THIS CODE AS AUTHORITATIVE IN *ANY* WAY.
 *
 * REPEAT, PLEASE DO NOT MAKE ANY MODIFICATIONS TO THIS CODE WITHOUT
 * FIRST CHECKING THE EQUIVALENT MODULE IN SAMBA_TNG, UPDATING THAT
 * FIRST, *THEN* CONSIDER MAKING THE SAME MODIFICATION IN THIS BRANCH
 *
 * YOU WILL, ALMOST GUARANTEED, FIND THAT THE BUG-FIX OR ENHANCEMENT THAT
 * YOU THINK IS NECESSARY, HAS ALREADY BEEN IMPLEMENTED IN SAMBA_TNG.
 * IF IT HAS NOT, YOUR BUG-FIX OR ENHANCEMENT *MUST* GO INTO SAMBA_TNG
 * AS THE SAMBA_TNG CODE WILL REPLACE THIS MODULE WITHOUT REFERENCE TO
 * ANYTHING IN IT, WITH THE POSSIBLE RISK THAT THE BUG-FIX OR ENHANCEMENT
 * MAY BE LOST.
 *
 * PLEASE OBSERVE AND RESPECT THIS SIMPLE REQUEST.
 *
 * THANK YOU.
 *
 * lkcl@samba.org
 */
0001-01-01 00:00:00 +00:00
Andrew Tridgell
453a822a76 first pass at updating head branch to be to be the same as the SAMBA_2_0 branch 0001-01-01 00:00:00 +00:00
Luke Leighton
eaac0923e0 rewrote policy handle code to be generic (it's needed for client-side too)
attempted to fix regsetsec command
0001-01-01 00:00:00 +00:00
Luke Leighton
c8fd555179 - typecast malloc / Realloc issues.
- signed / unsigned issues.
0001-01-01 00:00:00 +00:00
Luke Leighton
3b583f7be5 return results on prs_xxxxx() and all xxx_io_xxx() routines.
the whole task is not complete, yet.  xxx_io_xxx() routines that
_call_ xxx_io_xxx() routines not done.

prs_xxxx() covered by macros.  considering doing xxx_io_xxxx in the same way.
0001-01-01 00:00:00 +00:00
Luke Leighton
b2d9cbef6f reverted jeremy's c++-like security descriptor modifications as the
simplest method to get rpcclient's reggetsec command working.  the
buffers passed as arguments in do_reg_get_key_sec() do need to be
locally allocated not dynamically allocated, as two calls to
reg_get_key_sec() are needed.  on the first, the server fills in the
size of the security descriptor buffer needed.  on the second, the
server fills in the security descriptor buffer.
0001-01-01 00:00:00 +00:00
Luke Leighton
ec1b7000fd added jeremy's new c++-like code for parsing of security descriptors. 0001-01-01 00:00:00 +00:00
Jeremy Allison
4c2b5a0098 Makefile.in configure configure.in include/config.h.in: Changes for DGUX and UNIXWARE.
groupdb/aliasdb.c groupdb/aliasfile.c groupdb/groupfile.c: Don't use snprinf, use slprintf.
include/includes.h: Fix YP problem.
include/smb.h: Fix ZERO_STRUCTP.
lib/util_sock.c: Added strerror() in debugs.
passdb/ldap.c: Don't use snprinf, use slprintf.
rpc_client/cli_lsarpc.c rpc_client/cli_pipe.c rpc_parse/parse_sec.c rpc_server/srv_pipe.c: Don't use snprinf, use slprintf.
script/installman.sh: DGUX changes.
smbd/open.c smbd/oplock.c: Fixed gcc warnings.
web/swat.c: Changes USER to SWAT_USER.
0001-01-01 00:00:00 +00:00
Luke Leighton
ff8667c880 ZERO_STRUCTP not PN 0001-01-01 00:00:00 +00:00
Luke Leighton
70ac9dbcec use ZERO_STRUCTPN (checks for NULL) not ZERO_STRUCTP (doesn't check for NULL) 0001-01-01 00:00:00 +00:00
Jeremy Allison
b62f008974 include/smb.h: Re-added zero pointer protection to ZERO_STRUCTP.
lib/util_sock.c: Added strerror() calls to getpeername failures (which seem to be giving IRIX trouble at the moment).
rpc_parse/parse_sec.c: Changed use of ZERO_STRUCTPN to ZERO_STRUCTP which again does zero pointer protection.
smbd/quotas.c: Fixed typo.
Jeremy.
0001-01-01 00:00:00 +00:00
Luke Leighton
9412edfd4c security descriptors 0001-01-01 00:00:00 +00:00
Luke Leighton
06abdfd68e security descriptors.
kanji const char* warnings.
0001-01-01 00:00:00 +00:00
Luke Leighton
7466c3113e jean-f. sent me some S-1-3-0,1,2,3 SIDs and names. S-1-3 doesn't exist.
security descriptor testing.  hey wow, you can get a SD then send it back!
0001-01-01 00:00:00 +00:00
Luke Leighton
719382a557 security descriptor info, provided by jean-francois 0001-01-01 00:00:00 +00:00
Luke Leighton
abdc9d790b clearing up security descriptor 0001-01-01 00:00:00 +00:00
Luke Leighton
373f60256f split socket util functions into util_sock.c. util.c NOT committed
and util_sock.c NOT included in Makefile.in.

registry commands added to rpcclient.

waiting for 2_0_0 split before committing modified files.  these files
are new modules, and are not referenced in the Makefile.in
0001-01-01 00:00:00 +00:00