summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_sec.c
AgeCommit message (Collapse)AuthorFilesLines
2003-01-02BIG patch...Andrew Bartlett1-5/+5
This patch makes Samba compile cleanly with -Wwrite-strings. - That is, all string literals are marked as 'const'. These strings are always read only, this just marks them as such for passing to other functions. What is most supprising is that I didn't need to change more than a few lines of code (all in 'net', which got a small cleanup of net.h and extern variables). The rest is just adding a lot of 'const'. As far as I can tell, I have not added any new warnings - apart from making all of tdbutil.c's function const (so they warn for adding that const string to struct). Andrew Bartlett (This used to be commit 92a777d0eaa4fb3a1c7835816f93c6bdd456816d)
2002-07-15fixed a number of real bugs found by warnings on the 64 bit irix compilerAndrew Tridgell1-2/+2
(This used to be commit 04de6bbc8055e5547af41b10e284b722f40e726d)
2002-07-12The changes in make_sec_desc to make us match W2K broke the ↵Jeremy Allison1-19/+24
marshalling/unmarshalling of security descriptors. We need to calculate the maximum offset and set the offset back after reading/writing every field in the SEC_DESC. This was *nasty* to find.... Jeremy. (This used to be commit 175d43980e57c25582d8ab859f5730283e82f3b2)
2002-06-27a null grp_sid should have a 0 offset. Also removed a few more unnecessaryGerald Carter1-10/+6
prs_align() for sec_desc. (This used to be commit fc3770f281f6344a0589bfe614cd3e559b7259dd)
2002-06-26merge from APP_HEADGerald Carter1-13/+9
(This used to be commit d8cf54399d89b4023102ed8326d35147d91e4168)
2002-06-24sync with the sec_desc parsing fix from APP_HEAD. I will probably needGerald Carter1-16/+11
to revisit this some. (This used to be commit f471c880db8562231f2d6623124d3e9c31559f4c)
2002-06-18more debug classess activatedSimo Sorce1-0/+3
(This used to be commit 897e64d2e0c1d04ab93441ccaffe369bf43be46e)
2002-05-24merge from SAMBA_2_2.Gerald Carter1-0/+7
Tim, please check the prs_align() removed from sec_io_desc() and make sure it doesn't break anything else. I know it is right for the printing needs and I have tested some other general things like viewing acls on directories, but I would feel more comfortable if you would have a look as well. jerry (This used to be commit 83f109c940f30d9b35176540d8bdccbb22ffa3a1)
2002-04-29don't set the owner and group sid offset is there are no owner or groupJean-François Micouleau1-4/+5
owner. J.F. (This used to be commit 68e9211f5df0480cb88d7d21140c4954da47e7ae)
2002-03-10yipee! Finally put in the patch from Alexey KotovichAndrew Tridgell1-23/+243
<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. (This used to be commit 6891393b5db868246fe52ff62b3dc6aa5ca6f726)
2002-01-30Removed version number from file header.Tim Potter1-2/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2001-11-30Renamed sid field in SEC_ACE to trustee to be more in line with MS'sTim Potter1-4/+4
definitions. (This used to be commit 9712d3f15a47155f558d0034ef71fd06afb11301)
2001-10-02Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter1-2/+0
(This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
2001-08-07A collection of fixes/cleanups to the security descriptor code byTim Potter1-9/+10
matt_zinkevicius@hp.com (This used to be commit ce22267ec840aaa3cc8f9b88a62b45c723a06b01)
2001-06-26Ensure we always have a valid pointer on unmarshalling an SD with zeroJeremy Allison1-3/+7
ace entries. Jeremy. (This used to be commit 274c0f5028d41175222dfaaf446e3ed8f5687a5f)
2001-06-26Fixed bug introduced by changeover of security descriptor code fromTim Potter1-1/+8
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. (This used to be commit 89eaaafe7d266788609fab6951fd912c441b3a26)
2001-02-28Move to talloc control of SPOOL_XXX structs. Move to talloc control ofJeremy Allison1-100/+51
security descriptors and pointers. Syncup with 2.2 tree. Jeremy. (This used to be commit 14d5997dc841e78a619e865288486d50c245896d)
2001-02-27As prs_alloc_mem now zeros memory, remove superfluous memsets after it.Jeremy Allison1-6/+0
Jeremy. (This used to be commit 94fdffb3557fa68d634d6c402751f5bcb1f6a656)
2001-01-31Fixed duplicate free_sec_acl() call in free_sec_desc() function.Tim Potter1-1/+1
From "Richard Bollinger" <rabollinger@home.com> (This used to be commit 5b38513cef0cfeff09f54f855f9ace292050375c)
2001-01-11Changes from APPLIANCE_HEAD:David O'Neill1-1/+1
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 (This used to be commit 376601d17d53ef7bfaafa576bd770e554516e808)
2000-12-18Merged Tim's fixes from appliance-head.Jeremy Allison1-8/+39
Jeremy. (This used to be commit 26f873540c2299600cb80eb059fcdaf70ec82473)
2000-12-14Changes from APPLIANCE_HEAD:David O'Neill1-1/+9
- add some debugs for comparing two security descriptors. (source/rpc_parse/parse_sec.c) (This used to be commit 505a8a2277f2bc761bd2b170fafbcb3afd982d92)
2000-12-04no longer pass the type to make_sec_desc(), instead the type isAndrew Tridgell1-6/+8
derived from the other arguments (This used to be commit 9ec4b1fa48fbae937fdf78db06005a7b0cd52d89)
2000-11-07Merge of printer security descriptor, info level and printerdataTim Potter1-0/+157
comparison changes from appliance branch. (This used to be commit ae087bdf312806e08848695cad70a943bb3d71b9)
2000-08-01Tidyup removing many of the 0xC0000000 | NT_STATUS_XXX stuff (only need ↵Jeremy Allison1-2/+2
NT_STATUS_XXX). Removed IS_BITS_xxx macros as they were just reproducing "C" syntax in a more obscure way. Jeremy. (This used to be commit c55bcec817f47d6162466b193d533c877194124a)
2000-06-08Cause printer SD's to be displayed correctly (full control).Jeremy Allison1-1/+1
Jeremy. (This used to be commit 341d07c516865bdd9be99f98cd0754d12b25f9c0)
2000-06-07Fixing get/set of security descriptors.Jeremy Allison1-6/+11
Removed ugly hack for NT printing. Fixed up tdb parse stuff memory leaks. Jeremy. (This used to be commit 8ef41f31c53e14ad057d883810a1cd2301fede2a)
2000-06-04sec_desc_size() needs to handle a null secdescAndrew Tridgell1-2/+5
(This used to be commit b152d75ea677d4025dcaaf3ae9009db0979dc402)
2000-06-01Back to building. Now to test with insure.Jeremy Allison1-7/+30
Added some frees needed to stop memory leaks. Jeremy. (This used to be commit eba31e4e802120c9eb8c4688f521b4de9cb91f5c)
2000-06-01Getting back to a compilable state (not there yet but close).Jeremy Allison1-341/+359
Added patches for random -> sys_random. Added set_effective_xxx patches for AFS code. Memory allocation changes in spoolss code. Jeremy. (This used to be commit c2099cfb033c2cdb6035f4f7f50ce21b98e1584d)
2000-05-27security descs in spoolss. needs parse_sec.c nttrans.c broken.Luke Leighton1-356/+341
(This used to be commit f9f2a04fdb7b2af1cfe5bf26ec6f0d955ea948b9)
2000-05-10more mergingAndrew Tridgell1-8/+8
it is now at the stage that winbindd can compile in the head branch, but not link (This used to be commit d178c00aae77710ae6ff20a7f54a30e3bd8232bb)
2000-03-22acconfig.h configure configure.in: Added check for UT_SYSLEN for utmp code.Jeremy Allison1-26/+0
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. (This used to be commit f02999dbf7971b4ea05050d7206205d7737a78b2)
2000-03-22added the following message to all dce/rpc client/server code, exceptLuke Leighton1-0/+26
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 */ (This used to be commit cfaea90529be222f8df0e20a7ca1289f99c29e09)
1999-12-13first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1-308/+396
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)
1999-11-24rewrote policy handle code to be generic (it's needed for client-side too)Luke Leighton1-2/+5
attempted to fix regsetsec command (This used to be commit eaac0923e0e5e3f4c3d944272a71f3235ac2a741)
1999-10-25- typecast malloc / Realloc issues.Luke Leighton1-7/+7
- signed / unsigned issues. (This used to be commit c8fd555179314baf1672a23db34dc8ad9f2d02bf)
1999-10-15return results on prs_xxxxx() and all xxx_io_xxx() routines.Luke Leighton1-33/+53
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. (This used to be commit 3b583f7be51434af98bc52b48dfa42c4602a3094)
1999-08-03reverted jeremy's c++-like security descriptor modifications as theLuke Leighton1-372/+226
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. (This used to be commit b2d9cbef6f65bb696df8d8f49aa0c240e0bb1f50)
1999-02-23added jeremy's new c++-like code for parsing of security descriptors.Luke Leighton1-232/+378
(This used to be commit ec1b7000fd88c5a08e438c7033f60e49b9ec44a8)
1998-11-13Makefile.in configure configure.in include/config.h.in: Changes for DGUX and ↵Jeremy Allison1-1/+1
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. (This used to be commit 4c2b5a00983501e5d4aad1456ba8b5ab0dfd9b4c)
1998-11-13ZERO_STRUCTP not PNLuke Leighton1-6/+6
(This used to be commit ff8667c8801a59c80c33b43f033d23f3a0fd8313)
1998-11-13use ZERO_STRUCTPN (checks for NULL) not ZERO_STRUCTP (doesn't check for NULL)Luke Leighton1-6/+6
(This used to be commit 70ac9dbcecdf4be92638a24f096e4a8807997498)
1998-11-13include/smb.h: Re-added zero pointer protection to ZERO_STRUCTP.Jeremy Allison1-6/+6
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. (This used to be commit b62f008974c96e0302d6c146cf49bc2045bef005)
1998-11-13security descriptorsLuke Leighton1-3/+38
(This used to be commit 9412edfd4c11a26e4ef290839375e3959cf70a7e)
1998-11-12security descriptors.Luke Leighton1-15/+255
kanji const char* warnings. (This used to be commit 06abdfd68e1d7fa8741afc3f56ec7a13b5fa4ccc)
1998-11-12jean-f. sent me some S-1-3-0,1,2,3 SIDs and names. S-1-3 doesn't exist.Luke Leighton1-8/+22
security descriptor testing. hey wow, you can get a SD then send it back! (This used to be commit 7466c3113ef8f8a89b8496efadfeb611c9f3e069)
1998-11-11security descriptor info, provided by jean-francoisLuke Leighton1-25/+64
(This used to be commit 719382a5579e8798812bbccd14a4c1ffd9003f7a)
1998-11-11clearing up security descriptorLuke Leighton1-34/+38
(This used to be commit abdc9d790b7d27b70aaf88451f5c82c99c94ca6e)
1998-11-09split socket util functions into util_sock.c. util.c NOT committedLuke Leighton1-0/+176
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 (This used to be commit 373f60256fc6dc800f73d88ea9a302933a4a3246)