summaryrefslogtreecommitdiff
path: root/source3/include
AgeCommit message (Collapse)AuthorFilesLines
2000-09-12- fixed some memory leaks in the messages codeAndrew Tridgell1-0/+1
- added a MSG_PING message for performance testing. (This used to be commit e779f834dbb875669c3aa0a35b324aa13f0c8c36)
2000-09-12- changed the msg_type to be an int instead of an enum so that it isAndrew Tridgell2-5/+11
easier to add new message types to messages.h without breaking old binaries - added a MSG_FORCE_ELECTION message to force nmbd to hold an election (This used to be commit f1c49ca7ce56bc39259041a71479e84ebf53eeca)
2000-09-12much nicer message interface. We now register dispatch functions,Andrew Tridgell1-2/+4
allowing new bits of code or vfs modules to register functions without impacting on the messaging code itself. Also note that multiple registrations for the same message type are possible allowing the same message to be delivered to multiple parts of the code (possibly useful for reload messages). (This used to be commit c3350c77f52cade48d2945574e09cb630af85b92)
2000-09-11the first cut of the internal messaging system.Andrew Tridgell3-2/+36
The motivation for this system is to replace the UDP message for oplocks, but this commit only does the "set debug level" message. (This used to be commit 2a34ee95f3929cff131db6c5a2b4820194c05b2d)
2000-09-09Implemented DELETEPRINTERDATA (tested with Gerald's Win32 progs).Jeremy Allison2-0/+17
Jeremy. (This used to be commit fb48efaf830626f6ef05b88f5f8a74b932ceb257)
2000-09-08Win32 API is explicit that EnumPrinterData returns ERROR_MORE_DATA notJeremy Allison1-0/+1
ERROR_INSUFICIENT_BUFFER when working out what space is needed. This fix gives us the same return that WinNT does. Jeremy. (This used to be commit a87f6277b1faa1ea492f31add4ce33556bdf3695)
2000-09-06Fix for the SID history problem when using a Win2k domain controllerJeremy Allison3-3/+7
with security=domain. Also fixed to dynamically allocate the SIDs and GIDs. Jeremy. (This used to be commit 2b1f66eb82f05fe0b85ac5b4916e32847b8de675)
2000-09-05Implemented GETFORM tested and working using Gerald's Win32 test progs....Jeremy Allison2-1/+21
Jeremy. (This used to be commit 55ed0a9b0c91159c0fc4282c2171d9ced74a302a)
2000-09-01Changes from APPLIANCE_HEAD (per Tim Potter):David O'Neill2-3/+11
- 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-08-31Implemented DELETEFORM tested using Gerald's Win32 test code :-).Jeremy Allison2-1/+18
Jeremy. (This used to be commit 596c21a2af0309ce43a5e52a343a671036d05ebf)
2000-08-30Fixed error returns for moving printer driver files around so genericJeremy Allison1-1/+1
"Access denied" isn't always returned. More fixes found using Gerald's wonderful Win32 test progs :-). Jeremy. (This used to be commit 67b9d40e3df19523714430cb4457717575f2a61e)
2000-08-30Added vfs_unlink call to ensure vfs is used on unlink from client.Jeremy Allison1-1/+2
Jeremy. (This used to be commit 38fc56c8434c427335cf264c4b27420c5ad47566)
2000-08-30Implemented AbortPrinter() from Gerald's Win32 test code. Just purge allJeremy Allison2-4/+19
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-29make protoGerald Carter1-0/+2
(This used to be commit d59623dd92aac7de73d27dd6c64df57bfd0d4010)
2000-08-29added -P (for no prompt) and -A <authfile> optionsGerald Carter1-0/+1
jerry (This used to be commit 2d95c38f7e65a0379cbaadd57b8eb41d830b5a6b)
2000-08-29added a #define for SPOOLSSGETPRINTERDATAEX. Although we do notGerald Carter1-0/+1
support the RPC yte (win2k specific), I added it for documentation purposes. jerry (This used to be commit 41bf13341127b1c58105ca9a59fd686c15746164)
2000-08-28yipee!Andrew Tridgell2-1/+4
The spoolss AddJob function has an [in,out] buffer not an [in] buffer (despite the comment in the code to the contrary). Also, we must fail this function - not just blindly reply "no problem" as AddJob should always fail on non-local printers. This fixes a bug where the "print test page" failed about half the time. I suspect it will also fix a bunch of other intermittent spoolss bugs where the client (incorrectly) tries to use the AddJob printing interface. (This used to be commit 14e534a8907c34b53e00a63756efd71903ff9432)
2000-08-23Documentation on NT_USER_TOKEN. Requested by Sander.Jeremy Allison1-0/+5
Jeremy. (This used to be commit e203324d4a3b9aac99ed0b22cbd8c373461919dd)
2000-08-23Added code to do SID to uid/gid conversion. Needed for ACL support.Jeremy Allison1-10/+11
Jeremy. (This used to be commit 81c5380f91839b6416c8a42739dadf00e7388528)
2000-08-14Reverted the change Luke made. Removed IS_BITS_SET_XX macros.Jeremy Allison1-5/+0
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-14restored IS_BITS_SET_xxx macros.Luke Leighton1-0/+5
(This used to be commit bc065f9597654666e2f26ec046e058e44247d6e3)
2000-08-12reworked talloc() to in order to help track down invalidGerald Carter1-0/+6
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-12removed (void) typecast from SMB_ASSERTGerald Carter1-1/+1
jerry (This used to be commit f806881e6c2c94c03fb7e70d92cd0a5a3fc30fbd)
2000-08-10Tidied up security rights definitions.Jeremy Allison3-28/+20
Jeremy. (This used to be commit e466c863f5540e13776f4477b6d58e3fbfe7276d)
2000-08-09make protoGerald Carter1-2/+2
(This used to be commit ad74885e4730da2a15ff00e13f490f3f0b1be10d)
2000-08-09More work on AddPrinterDriver() and AddPrinterEx() client RPC'sGerald Carter1-1/+1
Also fixed init_unistr() to deal with a NULL source character string. -jerry (This used to be commit 8ecd5dd52a6bd867f5d117352048ee43ce7254d9)
2000-08-09added printer admin optionAndrew Tridgell1-0/+3
any user in that list can do anything to a printer (This used to be commit 7b5912be150dd590d6195be40b0976305b8716ba)
2000-08-08Changed the sec desc access checks to match the spec. Needs testing.Jeremy Allison1-3/+0
Jeremy. (This used to be commit 5a4a7cd4727df5d1b5e71d343e776c7df52dc515)
2000-08-08make protoGerald Carter1-2/+14
(This used to be commit 74074072cf244d221f8f9b09302d0cbc85d689d4)
2000-08-08All changes related to rpcclient...Gerald Carter2-1/+23
- 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-04make protoGerald Carter1-1/+1
(This used to be commit dfd6b51bc7fb61d25af3074c386ce51cf3bc86f4)
2000-08-04make protoGerald Carter1-3/+10
(This used to be commit 6bdb7d5c9787bd16e851f5c751d952c4df8ccc5b)
2000-08-04After talking with Jeremy and JF (and staring at packet traces betweenGerald Carter1-1/+3
NT <-> NT), I've come to realize that UNISTR2 strings should be NULL terminated. jerry (This used to be commit c8f9e54beafcb0c0668f1510e7693dbf22485aa8)
2000-08-04Fixed up the user/group contexts when using authenticated pipes.Jeremy Allison1-0/+2
Added a become_root()/unbecome_root() (push/pop security context) around the initgroups() call to ensure it would succeed. Hmmm - I wonder if this call being done as non-root might explain any "group access" bugs we've had in the past.... Jeremy. (This used to be commit 06a65972e872f37d88b84f22ea714feebd38f6c0)
2000-08-03Added an NT_USER_TOKEN structure that is copied/passed around associatedJeremy Allison3-3/+62
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 Allison2-15/+25
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-5/+0
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-08-01Added print job substitutions for %{printername}, %{sharename} and %{portname}Jeremy Allison2-0/+7
from the NT printer tdb. Also added checks for time restrictions before allowing a job to print. Jeremy. (This used to be commit 8cfb55e81abebf0354e6d470ed68bbac1d6560ad)
2000-07-31Added John Reilly's enumports/addprinter/delprinter scripting code plus theJeremy Allison2-1/+6
fix for the Win9x printer drivers. Changed command names to add "command" string on the end for some consistancy with the other scripting commands. Added '%P' option to tdbpack/unpack to store long comment string. Made port name be "Samba Printer Port" if no enum port script given. Fixed prs_uint32_pre code to cope with null args. Jeremy. (This used to be commit 902ada63799cf27924c72e24e7593a8c9fb5eba9)
2000-07-31make protoGerald Carter1-10/+13
(This used to be commit 38b07395566a2c114ccda173fb0fe88cf7683588)
2000-07-27Ok - this is a *BIG* change - but it fixes the problems with static stringsJeremy Allison5-20/+32
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-25make protoGerald Carter1-0/+5
--jerry (This used to be commit 1f65b13dd56fbe41320f6c4e8f391ce739509e45)
2000-07-25Added some error checking and returns to the new 'move' code.Jeremy Allison1-2/+2
Jeremy. (This used to be commit 0bd88d304cd773e0bbf3e6f7fedcb3b544d41cbe)
2000-07-25A rather big change set ! (listed in no particular order)Jean-François Micouleau2-7/+10
- changed the default forms flag to 2 - all short architecture name are uppercased - get_short_archi() is now case unsensitive - the drivers TDB is indexed by archi/version/name - implemented code to move drivers from the upload area to the download area. Someone else need to look at that code. - don't return anymore a default driver if it doesn't exist in the TDB. Instead return an error. - cleaned prs_unistr. - #ifdef out jeremy's new SD parsing in printer_info_2 - removed the unused MANGLE_CODE - #ifdef out the security checking in update_printer() as it doesn't work for me. Zap your ntdrivers.tdb, it won't work anymore. J.F. (This used to be commit ac0a145acc0953a6f362497abbf4dfe70aa522a6)
2000-07-22Fixed open handle code in printers - 3 functions were always being doneJeremy Allison2-21/+22
in order - moved them into open_printer_hnd(). Added saving of comment field. Jeremy. (This used to be commit a0ee774fe92e5d0bc84d1d6729e8c538c67e8aba)
2000-07-21make protoGerald Carter1-0/+13
(This used to be commit e4af400ed6580c04bcaf3a28fe8aeaa0cdbd4dcf)
2000-07-20make protoGerald Carter1-0/+10
(This used to be commit 1246728eb9013948d17ad44263501d1e1bb49e8f)
2000-07-19Code from John Reilly <jreilly@hp.com> to add tdb lookups into the Win95Jeremy Allison1-0/+1
printer driver download if looking for the default driver files fail. Jeremy. (This used to be commit 1192d867c4e863471f9bc12afceb68a23ba2142e)
2000-07-19Instead of handing back a string (which might be a DNS name or an IPChristopher R. Hertel1-2/+2
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-10/+7
*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)