summaryrefslogtreecommitdiffstats
path: root/source/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Tidied up security rights definitions.Jeremy Allison2000-08-101-4/+4
| | | | Jeremy.
* Removed requirement that sid have an owner before being interpreted.Jeremy Allison2000-08-101-18/+9
| | | | | Thanks to Elrond for pointing this out. Jeremy.
* Deal will NULL UNISTR in unistr_to_asciiGerald Carter2000-08-101-13/+21
| | | | jerry
* talloc returns 0xdeadbeef when asked to allocate 0 bytesGerald Carter2000-08-101-19/+29
| | | | jerry
* Fixed memory leak with NT tokens.Jeremy Allison2000-08-091-2/+15
| | | | | | Added debug messages to se_access_check(). Added FULL_ACCESS acl to default acl on printers. Jeremy.
* Added SID "Everyone" S-1-1-0 as always matching if present in an ACE.Jeremy Allison2000-08-081-4/+17
| | | | Jeremy.
* Changed the sec desc access checks to match the spec. Needs testing.Jeremy Allison2000-08-081-220/+149
| | | | Jeremy.
* All changes related to rpcclient...Gerald Carter2000-08-081-2/+2
| | | | | | | | | | | | | - cleaned up some code - Fixed a few memory leaks of my own making - Add AddPrinterDriver(); I'm missing some of the semantics here as the call is done correctly, but I'm not getting all the information right in the DRIVER_INFO_3 struct I think. Will work on it tomorrow some more... --jerry
* Fixed up se_access_check() to use the token list from the user structJeremy Allison2000-08-041-82/+32
| | | | | as the SID list. Now to go through and tidy up the algorithm. Jeremy.
* Added an NT_USER_TOKEN structure that is copied/passed around associatedJeremy Allison2000-08-031-3/+5
| | | | | | | with the current user. This will allow se_access_check() to quickly do a SD check without having to translate uid/gid's to SIDs. Still needs work on pipe calls. Jeremy.
* Started to canonicalize our handling of uid -> sid code in order toJeremy Allison2000-08-021-19/+27
| | | | | | | | | | | | | | | | | | | | | | | | | get ready and fix se_access_check(). Added cannonical lookup_name(), lookup_sid(), uid_to_sid(), gid_to_sid() functions that look via winbind first the fall back on local lookup. All Samba should use these rather than trying to call winbindd code directly. Added NT_USER_TOKEN struct in user_struct, contains list of NT sids associated with this user. se_access_check() should use this (cached) value rather than attempting to do the same thing itself when given a uid/gid pair. More work needs to be done to preserve these things accross security context changes (especially with the tricky pipe problem) but I'm beginning to see how this will be done..... probably by registering a new vuid for an authenticated RPC pipe and not treating the pipe calls specially. More thoughts needed - but we're almost there... Jeremy.
* Tidyup removing many of the 0xC0000000 | NT_STATUS_XXX stuff (only need ↵Jeremy Allison2000-08-011-13/+7
| | | | | | | | NT_STATUS_XXX). Removed IS_BITS_xxx macros as they were just reproducing "C" syntax in a more obscure way. Jeremy.
* More work on rpcclient...Gerald Carter2000-07-311-4/+2
| | | | | | | | | | | | * Fixed to work with Jeremy's recent changes re: dunamic memory allocation when unmarshalling unistr[2] * included EnumPorts level 1 * more work on AddPrinterEx --jerry
* Ok - this is a *BIG* change - but it fixes the problems with static stringsJeremy Allison2000-07-273-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | in the RPC code. This change was prompted by trying to save a long (>256) character comment in the printer properties page. The new system associates a TALLOC_CTX with the pipe struct, and frees the pool on return of a complete PDU. A global TALLOC_CTX is used for the odd buffer allocated in the BUFFERxx code, and is freed in the main loop. This code works with insure, and seems to be free of memory leaks and crashes (so far) but there are probably the occasional problem with code that uses UNISTRxx structs on the stack and expects them to contain storage without doing a init_unistrXX(). This means that rpcclient will probably be horribly broken. A TALLOC_CTX also needed associating with the struct cli_state also, to make the prs_xx code there work. The main interface change is the addition of a TALLOC_CTX to the prs_init calls - used for dynamic allocation in the prs_XXX calls. Now this is in place it should make dynamic allocation of all RPC memory on unmarshall *much* easier to fix. Jeremy.
* if the sids are not the same pointer and either of the sids are NULLAndrew Tridgell2000-07-251-0/+3
| | | | then the two sids are not equal
* Added EnumPorts() and fixed up some problemsGerald Carter2000-07-211-48/+27
| | | | | | | | | with the other spoolss client calls. Also cleaned up output for 'help' command. jerry
* Instead of handing back a string (which might be a DNS name or an IPChristopher R. Hertel2000-07-191-33/+85
| | | | | | | | | | | | | | | | | | string), the wins_srv module now hands back a struct in_addr when it's called. It caches the IP address once it has been looked up. The IP is cleared (and must be looked up again) if the 'wins server' parameter is reread, or if the node is marked 'dead'. A dead node will not be re-tried for 10 minutes (per a #define in wins_srv.c). As it was, the code was reading the WINS server name or IP directly from lp_wins_server. That's okay, except that if the value was expressed as a name, then a DNS lookup would be done every time the client wanted to talk to the server. I still need to work out the implications of failover regarding the 'unicast subnet' list. Chris -)-----
* First cut toward adding WINS server failover.Christopher R. Hertel2000-07-191-0/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | *Note: failover doesn't actually work yet!* It's just that the code I'm adding provides all of the pieces necessary. I do have one big question. Something that I'll have to ask Jeremy, I'm thinkin'. In nmbd/nmbd_subnetdb.c the IP of the WINS server is used to set up the Unicast subnet. ...so what happens if the WINS server changes? My guess is either: a) nothing. b) I'd have to change the unicast subnet entry whenever the WINS server changes. Urq. BTW, the lp_wins_server() function no longer returns the WINS server name or IP. It returns the list of WINS servers entered in smb.conf. To get the currently 'live' WINS server, use the wins_srv() function. Fun, eh? Chris -)-----
* I really didn't like the way generic arrays (lists) wereGerald Carter2000-07-181-0/+321
| | | | | | | | | | | | | implemented in util_array.c so I wrote a smaller (and simplier package). I would like to replace the use of util_array.c functions in the rest of the source tree if no one objects. This will be an interface change, but not really a difference in the functionality provided. --jerry
* Added some debugs.Tim Potter2000-07-171-13/+27
| | | | | Changed interface to se_access_check to take a user struct instead of each bit as a separate parameter.
* Fixed a bug in cmd_interp.c where if user%pass was entered onGerald Carter2000-07-142-206/+3
| | | | | | | | | | | | the command line, the password would still be cached in memory in plain text for the lifetime of the rpcclient command line session. removed loopback connection functions from msrpc-client.c since we don't support that in the server code now anyways. simplify, simplify, ... --jerry
* Uninitialised variables.Tim Potter2000-07-131-0/+2
|
* Fixed a bug in parsing the command line.Gerald Carter2000-07-101-1/+1
| | | | jerry
* Fixes for various compile warnings on Solaris 8.Tim Potter2000-07-101-1/+2
|
* Moved winbind client functions from various odd locations toTim Potter2000-07-101-64/+0
| | | | | | nsswitch/wb_client.c Merge of nsswitch/common.c rename to nsswitch/wb_common.c from TNG.
* Added some useful debugging stuff.Tim Potter2000-07-101-10/+66
| | | | Fixes for se_access_check() when you are the owner of the object.
* More rpcclient merge issues:Gerald Carter2000-07-073-9/+221
| | | | | | | | | | | | * fixes some readline bugs from the merge * first attempt at commands (spoolenum almost works) * no changes to existing functions in HEAD; only additions of new functions. I'll weed out what I can as I go. --jerry
* Rewrite of se_access_check() function. Added comments and fixed a bunch ofTim Potter2000-07-061-189/+287
| | | | | bugs. I think there is a problem though with the permissions granted when SEC_RIGHTS_MAXIMUM_ALLOWED is passed as the permissions requested.
* Added global_sid_NULL S-1-0-0 to list of global sids.Tim Potter2000-07-061-0/+2
|
* Bracked unbracketed macro arguments while looking for another bug.Tim Potter2000-07-061-2/+2
|
* first pass at merging rpcclient from TNG to HEAD. You can get aGerald Carter2000-07-032-0/+1395
| | | | | | | semi-connection and a rpcclient prompt, but no functionality there yet. Will be a few more days on that. --jerry
* fixed size alignment in tallocAndrew Tridgell2000-06-261-2/+2
|
* lib/util_sid.c: Uninitialized memory read.Jeremy Allison2000-06-241-0/+2
| | | | | | | | | | rpc_parse/parse_spoolss.c: Added note about prs_align when marshalling a SEC_DESC... rpc_server/srv_lsa.c: Tim - your changes broke the display of the 'everyone' group when doing file access with no winbindd running. This is a partial fix - more when I have analysed this more. rpc_server/srv_spoolss_nt.c: Fix for the 'change driver' problem ! Hurrah ! Jeremy.
* lib/util_unistr.c: Off-by-one fix for dos_PutUniStr from John Reilly ↵Jeremy Allison2000-06-231-1/+1
| | | | | | | jreilly@hp.com. Memory leak fix for new sec_ctx code (sorry Tim :-). Jeremy.
* lib/util_unistr.c: Removed ascii_to_unistr() as it does no codepage.Jeremy Allison2000-06-221-48/+3
| | | | | | | | | Removed unistr_to_ascii() as it was never used. printing/nt_printing.c: Removed "DUMMY.XX" files. rpc_server/srv_spoolss_nt.c: Use dos_PutUniCode() instead of ascii_to_unistr(). Attempted to fix the "return value" size code based on J.F's comments. This needs looking at. Jeremy.
* fixed two minor bugs in new sys_select()Andrew Tridgell2000-06-211-5/+5
|
* Paranoia changes to ensure that anything touched by a signal handlerJeremy Allison2000-06-191-1/+1
| | | | | and the main code is declared as VOLATILE SIG_ATOMIC_T. Jeremy.
* Merged parse_domain_user() from TNG.Tim Potter2000-06-141-0/+20
|
* forgot to checkin select.cAndrew Tridgell2000-06-131-0/+107
|
* totally rewrote the async signal, notification and oplock notificationAndrew Tridgell2000-06-122-109/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | handling in Samba. This was needed due to several limitations and races in the previous code - as a side effect the new code is much cleaner :) in summary: - changed sys_select() to avoid a signal/select race condition. It is a rare race but once we have signals doing notification and oplocks it is important. - changed our main processing loop to take advantage of the new sys_select semantics - split the notify code into implementaion dependent and general parts. Added the following structure that defines an implementation: struct cnotify_fns { void * (*register_notify)(connection_struct *conn, char *path, uint32 flags); BOOL (*check_notify)(connection_struct *conn, uint16 vuid, char *path, uint32 flags, void *data, time_t t); void (*remove_notify)(void *data); }; then I wrote two implementations, one using hash/poll (like our old code) and the other using the new Linux kernel change notify. It should be easy to add other change notify implementations by creating a sructure of the above type. - fixed a bug in change notify where we were returning the wrong error code. - rewrote the core change notify code to be much simpler - moved to real-time signals for leases and change notify Amazingly, it all seems to work. I was very surprised!
* fixed a bug in BlockSignals() for systems that don't haveAndrew Tridgell2000-06-121-4/+2
| | | | sigprocmask()
* Linux kernel oplocks now seem to work, but need a _lot_ of testingAndrew Tridgell2000-06-113-11/+21
| | | | | I had to modify sys_select() to not loop on EINTR. I added a wrapper called sys_select_intr() which gives the old behaviour.
* continued the split of the kernel level oplocks code into a moreAndrew Tridgell2000-06-101-0/+2
| | | | | modular form. In this pass I added oplock_irix.c and added a "struct kernel_oplocks" that describes a kernel oplock implementation.
* Fix from Elrond for hash table corruption. Should fix stat cache bug (IJeremy Allison2000-06-091-2/+10
| | | | | sincerely hope :-). Thanks elrond ! Jeremy.
* do some standard_sub_advanced() in api_net_sam_logon on lp_logon_xxx().Jean-François Micouleau2000-06-091-1/+1
| | | | | | | and if you have unix realname=yes, you get the gecos name when locking the station. J.F.
* clean up oplock capability code ready for Linux codeAndrew Tridgell2000-06-092-13/+20
|
* added se_access_check.Luke Leighton2000-06-082-0/+281
|
* Getting back to a compilable state (not there yet but close).Jeremy Allison2000-06-011-1/+1
| | | | | | | Added patches for random -> sys_random. Added set_effective_xxx patches for AFS code. Memory allocation changes in spoolss code. Jeremy.
* The functionality in this file has been moved into smbd/unix_acls.c in orderJeremy Allison2000-05-311-679/+0
| | | | | to make the acl functionality regular (we can have smbd/posix_acls etc). Jeremy.
* Fixed LsaQueryInformationPolicy level 3 to return primary domain info.Matthew Chapman2000-05-291-9/+12
| | | | | | | Domain SID is saved in secrets.tdb upon joining domain. Added "Authenticated Users" and "SYSTEM" well-known SIDs (under NT Authority).