summaryrefslogtreecommitdiff
path: root/source3/lib
AgeCommit message (Collapse)AuthorFilesLines
2000-09-01Changes from APPLIANCE_HEAD (per Tim Potter):David O'Neill1-0/+75
- make proto - addition of function to convert from errno values to NT status codes (source/lib/error.c) - purge queue done without full access permission will purge only the jobs owned by that user, rather than failing. - unlock job database tdb before sending job to printer - in print_job_start(), ensure that we don't pick a jobid with an existing temporary file that may be owned by another user, as it causes silent failures. - fixes for printer permission checking for NT5 clients (source/include/rpc_spoolss.h, source/printing/nt_printing.c, source/printing/printing.c, source/rpc_server/srv_spoolss_nt.c) - change from uint8 to 'enum SID_NAME_USE' (source/rpc_server/srv_lsa.c) - fixed memory leaks for win95 driver download process (source/smbd/lanman.c) - properly free prs_structs and dacl in testsuite/printing/psec.c (This used to be commit 74af3e2caec7197e5d1ca389e2f78054a4197502)
2000-09-01-U% should be an anonymous connection. Fixed bug whereGerald Carter1-1/+2
the password was being set to "" instead of NULL. ..and yes Elrond, I'll merge this into TNG. P jerry (This used to be commit cc611ecc674832f7e7390b5e7ad6648c9d622e9e)
2000-08-30Implemented AbortPrinter() from Gerald's Win32 test code. Just purge allJeremy Allison1-0/+2
possible printjobs from that printer (I think this is correct). Added error code returns for print_queue_XXX() functions. Jeremy. (This used to be commit 6d081a9017f87f59b7189ba507e211db01c40af5)
2000-08-29added -P (for no prompt) and -A <authfile> optionsGerald Carter1-22/+92
jerry (This used to be commit 2d95c38f7e65a0379cbaadd57b8eb41d830b5a6b)
2000-08-29needed to use strwicmp() in smbclient code, so I moved it to util_str.cGerald Carter1-0/+30
and made it non-static --jerry (This used to be commit dfdca21bd90b9c83f195d580ec9d774f1be8f9cb)
2000-08-28made reopen_logs() always re-open logs, not try and be smart about notAndrew Tridgell1-37/+34
re-opening in some circumstances. This fixes a problem where a HUP does not re-open logs and leaves the log open on a unlinked file. (This used to be commit f99f028c77482e591741df2a3da7f036f7409a68)
2000-08-25- fixed the %U macro so that the old (and documented) semantics workAndrew Tridgell1-2/+13
again. This got broken with one of the substitute.c updates a couple of months ago. - also fixed %u to return the username from the current_user structure when called via a method that does not have direct access to the username. I cache the uidtoname() result to prevent thrashing nss. (This used to be commit 2520a0eff9c5decbec79aababe9910db3535890a)
2000-08-23Added code to do SID to uid/gid conversion. Needed for ACL support.Jeremy Allison1-2/+2
Jeremy. (This used to be commit 81c5380f91839b6416c8a42739dadf00e7388528)
2000-08-18oops. must return "" string and length zero when strlen(filebuf) == 0Luke Leighton1-13/+16
(This used to be commit d3bc7cca99e47ce89035a03022d7c3ec69e01636)
2000-08-18getfileline() - line with length of zero -> filebuf[strlen(filebuf)-1]Luke Leighton1-10/+13
is NOT ok. (This used to be commit 24e0c8ef70dc59bfaaa113c3d44befbccbcba15f)
2000-08-14Reverted the change Luke made. Removed IS_BITS_SET_XX macros.Jeremy Allison1-13/+7
Do not re-add them. These macros are unsafe as they are not understood. Change all TNG code using them to correct '&' and '|' please. IS_BITS_SET_ALL was being used in cmd_interp.c when IS_BITS_SET_SOME should have been used. Jeremy. (This used to be commit be4e5eeb4f808c1d8ac4030e8886a83a37914c57)
2000-08-14hey, jerry: turns out you _have_ converted to get_safe_nt_errmsg!!!Luke Leighton1-2/+4
[got confused with which way dirdiff was going :)]. ... but you forgot to update TNG's lib/cmd_interp.c... (This used to be commit 8fe195df0b5826af7048ef6c87e4b55dfd336cf8)
2000-08-14jeremy,Luke Leighton1-11/+15
please do not remove IS_BITS_SET_XXX macros just because you happen "not to like them". whilst still working on merging, you are not responsible for this code, therefore do not hinder its development whilst people are attempting to do merges. after the merge from TNG to cvs main is completed, you can do what the hell you like. thank you. jerry, please could you consider adding underlying routines (in this case get_safe_smb_errstr()) instead of reverting to a [less secure] previous coding method. thanks. (This used to be commit b2e044f89de7cb12fd14540d5d7d5070951ce2fb)
2000-08-12fixed unistr_to_ascii to deal with NULL src stringsGerald Carter1-14/+14
jerry (This used to be commit 8e95aae1709a9be28d6e25ff6f0fdc729dc09274)
2000-08-12reworked talloc() to in order to help track down invalidGerald Carter1-25/+26
memory access. Tridge, I don't think using 0xdeadbeef for size allocations of 0 is going to work. I ended up having to use NULL as much code that works on UNISTR checks to see if the buffer ptr is NULL. So valid code ends up with a seg fault. Rather than rewriting it all, I added a DEBUG_TALLOC #ifdef in talloc.h that sets a macro BAD_PTR. This is the value assigned to ptr for an allocation of 0 bytes. jerry (This used to be commit 233b9cffa2350552d9f775f791d5d5e0464a1ed4)
2000-08-10Tidied up security rights definitions.Jeremy Allison1-4/+4
Jeremy. (This used to be commit e466c863f5540e13776f4477b6d58e3fbfe7276d)
2000-08-10Removed requirement that sid have an owner before being interpreted.Jeremy Allison1-18/+9
Thanks to Elrond for pointing this out. Jeremy. (This used to be commit 1d9a5494f8214b8d6171073f4090687a8535d78c)
2000-08-10Deal will NULL UNISTR in unistr_to_asciiGerald Carter1-13/+21
jerry (This used to be commit cfa4c878a2ccaf346940f8f4a201737e185f76d6)
2000-08-10talloc returns 0xdeadbeef when asked to allocate 0 bytesGerald Carter1-19/+29
jerry (This used to be commit df51dc32f6ffc4fe2cebfaae5079417aad1ff34d)
2000-08-09Fixed memory leak with NT tokens.Jeremy Allison1-2/+15
Added debug messages to se_access_check(). Added FULL_ACCESS acl to default acl on printers. Jeremy. (This used to be commit 7507f6f408cf8b0f8d7e2b3da54ce5fb5ef5343b)
2000-08-08Added SID "Everyone" S-1-1-0 as always matching if present in an ACE.Jeremy Allison1-4/+17
Jeremy. (This used to be commit b3a1038ac1bfb0c32e64f6cb26e5e46fbda794a2)
2000-08-08Changed the sec desc access checks to match the spec. Needs testing.Jeremy Allison1-220/+149
Jeremy. (This used to be commit 5a4a7cd4727df5d1b5e71d343e776c7df52dc515)
2000-08-08All changes related to rpcclient...Gerald Carter1-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 (This used to be commit 3bf9a29f34ee4ade5180c5a0b0b9ff4aca7f0f08)
2000-08-04Fixed up se_access_check() to use the token list from the user structJeremy Allison1-82/+32
as the SID list. Now to go through and tidy up the algorithm. Jeremy. (This used to be commit 1f7300df6713a6728feb1600ca7e62fc213232fc)
2000-08-03Added an NT_USER_TOKEN structure that is copied/passed around associatedJeremy Allison1-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. (This used to be commit e28d01b744b3dbd33e0e54af4e7f426fa8c082b8)
2000-08-02Started to canonicalize our handling of uid -> sid code in order toJeremy Allison1-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. (This used to be commit 5e5cc6efe2e4687be59085f562caea1e2e05d0a8)
2000-08-01Tidyup removing many of the 0xC0000000 | NT_STATUS_XXX stuff (only need ↵Jeremy Allison1-13/+7
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-07-31More work on rpcclient...Gerald Carter1-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 (This used to be commit 45fbf31b698d6e754630590034cff712c0a716b1)
2000-07-27Ok - this is a *BIG* change - but it fixes the problems with static stringsJeremy Allison3-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. (This used to be commit 0ff2ce543ee54f7364e6d839db6d06e7ef1edcf4)
2000-07-25if the sids are not the same pointer and either of the sids are NULLAndrew Tridgell1-0/+3
then the two sids are not equal (This used to be commit 9ccf3b1dc5baf0e00d032d8b932ab0fb5b1e11b1)
2000-07-21Added EnumPorts() and fixed up some problemsGerald Carter1-48/+27
with the other spoolss client calls. Also cleaned up output for 'help' command. jerry (This used to be commit a0e8a55c279af50c1f770c7b913262094b9b593a)
2000-07-19Instead of handing back a string (which might be a DNS name or an IPChristopher R. Hertel1-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 -)----- (This used to be commit 73aa188320fd3bf10b5dfc057323f40aff2c13bd)
2000-07-19First cut toward adding WINS server failover.Christopher R. Hertel1-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 -)----- (This used to be commit cc08bdc74f4cd111fdc582ee7babef47ed8a950d)
2000-07-18I really didn't like the way generic arrays (lists) wereGerald Carter1-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 (This used to be commit 0863ce3a31e4c76c8356850ac128f6d96ea54917)
2000-07-17Added some debugs.Tim Potter1-13/+27
Changed interface to se_access_check to take a user struct instead of each bit as a separate parameter. (This used to be commit ff7938310d0636b165b03a2b0a15e51494b2459f)
2000-07-14Fixed a bug in cmd_interp.c where if user%pass was entered onGerald Carter2-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 (This used to be commit 8599e1bc394b1caee2483ec72d439a34d3f30629)
2000-07-13Uninitialised variables.Tim Potter1-0/+2
(This used to be commit a895868912a24589de3a904ca537cf3367a645bf)
2000-07-10Fixed a bug in parsing the command line.Gerald Carter1-1/+1
jerry (This used to be commit ebcb7473c6b62266c30e276d02186d8e50a5629a)
2000-07-10Fixes for various compile warnings on Solaris 8.Tim Potter1-1/+2
(This used to be commit 898a483cdab1ed7d8ff902c0dc0e0620440ae4cd)
2000-07-10Moved winbind client functions from various odd locations toTim Potter1-64/+0
nsswitch/wb_client.c Merge of nsswitch/common.c rename to nsswitch/wb_common.c from TNG. (This used to be commit f866c18f6be65db67d9d2a6c0b42e1af3b421e6c)
2000-07-10Added some useful debugging stuff.Tim Potter1-10/+66
Fixes for se_access_check() when you are the owner of the object. (This used to be commit 1478198b709b26d0007a8ff0586c34fc6f37a9d2)
2000-07-07More rpcclient merge issues:Gerald Carter3-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 (This used to be commit 61d2aad5dc2b212b11c981f1eca47efa627e9fc8)
2000-07-06Rewrite of se_access_check() function. Added comments and fixed a bunch ofTim Potter1-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. (This used to be commit 27d821913c87dddd44a0690f4b191c9d2445817e)
2000-07-06Added global_sid_NULL S-1-0-0 to list of global sids.Tim Potter1-0/+2
(This used to be commit f49905e74c6e3891b5816b136fd1d0d77c392e2f)
2000-07-06Bracked unbracketed macro arguments while looking for another bug.Tim Potter1-2/+2
(This used to be commit 873774e36dfc877727133a86fbc2c2ddc2d563cd)
2000-07-03first pass at merging rpcclient from TNG to HEAD. You can get aGerald Carter2-0/+1395
semi-connection and a rpcclient prompt, but no functionality there yet. Will be a few more days on that. --jerry (This used to be commit 269051aa0c52728278a1d290148564f11cf7f189)
2000-06-26fixed size alignment in tallocAndrew Tridgell1-2/+2
(This used to be commit 064cdb7ee69bff3af12d1e0b3c3b59207c594681)
2000-06-24lib/util_sid.c: Uninitialized memory read.Jeremy Allison1-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. (This used to be commit 151b131ee01ef916c072bcdaa9943a2e984a0f45)
2000-06-23lib/util_unistr.c: Off-by-one fix for dos_PutUniStr from John Reilly ↵Jeremy Allison1-1/+1
jreilly@hp.com. Memory leak fix for new sec_ctx code (sorry Tim :-). Jeremy. (This used to be commit edaf49c66d5a5ccf6689b358c301e208599a468f)
2000-06-22lib/util_unistr.c: Removed ascii_to_unistr() as it does no codepage.Jeremy Allison1-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. (This used to be commit de99011bf3b2a23bd1854a047382a107aaeb9c68)