Luke Leighton [Mon, 14 Aug 2000 07:37:12 +0000 (07:37 +0000)]
hey, jerry: turns out you _have_ converted to get_safe_nt_errmsg!!!
[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)
Luke Leighton [Mon, 14 Aug 2000 07:33:34 +0000 (07:33 +0000)]
jeremy,
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)
Gerald Carter [Mon, 14 Aug 2000 03:18:17 +0000 (03:18 +0000)]
minor formatting fixes.
jerry
(This used to be commit
95355d2cf26f51b1f928b8a020a4a731483be0b8)
Gerald Carter [Mon, 14 Aug 2000 03:17:17 +0000 (03:17 +0000)]
fix for new_smb_io_relarraystr() and new_smb_io_relstr()
to use spool_smb_io_unistr() as this does not call prs_align()
befrore parsing the UNISTR.
Parsing a void* buffer from an RPC should not be aligned
on 4 byte boundaries. Don't think this change affects
any marshalling code, only unmarshalling...
jerry
(This used to be commit
bc154e8522a75540a8504195c1e6f45739167e6b)
Gerald Carter [Sat, 12 Aug 2000 14:51:36 +0000 (14:51 +0000)]
removed the prs_align in spoolss_smb_io_unistr() (JF, please check)
as it was throwing things off when parsing buffers passed in SPOOLSS
RPCs
fixed the unmarshalling of UNISTR arrays to be double NULL terminated
jerry
(This used to be commit
236f19659cea87cc35128990954d30c43114b889)
Gerald Carter [Sat, 12 Aug 2000 14:31:29 +0000 (14:31 +0000)]
fixes to prs_unistr UNMARSHALLING only. Problem was due to talloc's
of 0 bytes.
jerry
(This used to be commit
3fcc59ba928250759bbf3ef46d7c118950a5ba6f)
Gerald Carter [Sat, 12 Aug 2000 14:26:01 +0000 (14:26 +0000)]
FIxed some unmarshalling problems with relstr and unistr arrays
jerry
(This used to be commit
ce2d20395ae3d41d55030427f4b7b44ce87c605e)
Gerald Carter [Sat, 12 Aug 2000 14:20:40 +0000 (14:20 +0000)]
fixed unistr_to_ascii to deal with NULL src strings
jerry
(This used to be commit
8e95aae1709a9be28d6e25ff6f0fdc729dc09274)
Gerald Carter [Sat, 12 Aug 2000 14:14:40 +0000 (14:14 +0000)]
reworked talloc() to in order to help track down invalid
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)
Gerald Carter [Sat, 12 Aug 2000 14:10:27 +0000 (14:10 +0000)]
removed (void) typecast from SMB_ASSERT
jerry
(This used to be commit
f806881e6c2c94c03fb7e70d92cd0a5a3fc30fbd)
John Terpstra [Sat, 12 Aug 2000 02:41:42 +0000 (02:41 +0000)]
Updated by Patrick Powell <papowell@lprng.org>
(This used to be commit
3361c144f5ba2a87a469436f670ab35189021d49)
Jeremy Allison [Fri, 11 Aug 2000 23:13:09 +0000 (23:13 +0000)]
Fixed the problem with UNISTR marshalling in a buffer5 struct.
The smb_io_unistr() code called a prs_align, this was not being
counted in the size or taken account of in the offset calculation.
Fixed size_ calculation to always return a size a multiple of 4
and also set the offset correctly. This fixes the problem I saw
and will hopefully fix the problem HP reported. JF please check
this change.
Jeremy.
(This used to be commit
ceba9f3dcdb4bddae17ec0024692c9074086302d)
Christopher R. Hertel [Fri, 11 Aug 2000 22:29:44 +0000 (22:29 +0000)]
First shot at actually *doing* WINS failover.
If libsmb/namequery.c:name_query() times out while doing a non-broadcast
query, I mark that WINS server 'dead'. Note that I don't try the new
WINS server. I think I can get that working too.
This is only for queries, not registrations. The biggest problem is that
I may have to fiddle with the UNICAST SUBNET, but I need to check talk
that over with someone (Jeremy?) before I hack at it.
I can't actually test the above change, I'm 'fraid. I'm getting:
4 errors detected in the compilation of "rpc_server/srv_spoolss_nt.c".
in head branch.
Chris -)-----
(This used to be commit
40ae638866e3d826ccd5d827672634959c31b039)
Jeremy Allison [Fri, 11 Aug 2000 00:53:13 +0000 (00:53 +0000)]
Fix case where volumename could be returned as UNIX charset or DOS codepage
depending on where it came from.
Jeremy.
(This used to be commit
cfbf78085d48671e5be382e7486953a85a893be1)
Jeremy Allison [Thu, 10 Aug 2000 23:41:16 +0000 (23:41 +0000)]
Added "add_printer_hook" call to update printer for Win9x clients.
Patch from John Reilly <jreilly@hp.com>.
Jeremy.
(This used to be commit
76a5713bd3fad18ec60d12fc3f965f3e9717c159)
Jeremy Allison [Thu, 10 Aug 2000 19:51:45 +0000 (19:51 +0000)]
Tidied up security rights definitions.
Jeremy.
(This used to be commit
e466c863f5540e13776f4477b6d58e3fbfe7276d)
Jeremy Allison [Thu, 10 Aug 2000 17:48:15 +0000 (17:48 +0000)]
Removed requirement that sid have an owner before being interpreted.
Thanks to Elrond for pointing this out.
Jeremy.
(This used to be commit
1d9a5494f8214b8d6171073f4090687a8535d78c)
Gerald Carter [Thu, 10 Aug 2000 14:05:19 +0000 (14:05 +0000)]
Working on spoolss_getprinterdriver() as it does not display all the
dependentfiles.
jery
(This used to be commit
206565368b887ba83791efe018f24175e6f31137)
Gerald Carter [Thu, 10 Aug 2000 14:03:13 +0000 (14:03 +0000)]
working on the unmarshalling of dependentfiles to a DRIVER_INFO_3
struct. Not wuite there.
jerry
(This used to be commit
1a145977f09654fc51ebcd40ef7a2aa69aa96cfb)
Gerald Carter [Thu, 10 Aug 2000 14:02:07 +0000 (14:02 +0000)]
code formatting cleanup
jerry
(This used to be commit
4bc5b8aa345b963e1247c6a364ba48a08fbd9764)
Gerald Carter [Thu, 10 Aug 2000 14:00:40 +0000 (14:00 +0000)]
deal with allocation size of 0 in prs_unistr when UNMARSHALLING
jerry
(This used to be commit
26a73a70e282a5e46cc2b6fe7bc09b406724c9dd)
Gerald Carter [Thu, 10 Aug 2000 14:00:05 +0000 (14:00 +0000)]
Deal will NULL UNISTR in unistr_to_ascii
jerry
(This used to be commit
cfa4c878a2ccaf346940f8f4a201737e185f76d6)
Gerald Carter [Thu, 10 Aug 2000 13:58:15 +0000 (13:58 +0000)]
talloc returns 0xdeadbeef when asked to allocate 0 bytes
jerry
(This used to be commit
df51dc32f6ffc4fe2cebfaae5079417aad1ff34d)
Gerald Carter [Thu, 10 Aug 2000 04:10:29 +0000 (04:10 +0000)]
Needed to add the SHARED attribute bit when creating a printer
on a Samba host. Also needed to add an option to pass the share
name (printer name) on the command line.
And fixed the checking of the return code for spoolss_r_addprinterex()
jerry
(This used to be commit
880e81161640cd38540b06d982c592cbada51d40)
Jeremy Allison [Wed, 9 Aug 2000 23:19:50 +0000 (23:19 +0000)]
Fixed bug in new printer access check code. If PRINTER_ALL_ACCESS is changed
in the ACE's the same thing must be done in the desired access or they will
never match. This took me a while to find... :-).
Jeremy.
(This used to be commit
066520979b2b5d967e6e1d77f16185a5fb19dc0c)
Gerald Carter [Wed, 9 Aug 2000 20:19:37 +0000 (20:19 +0000)]
Gerald Carter [Wed, 9 Aug 2000 20:14:29 +0000 (20:14 +0000)]
More work on AddPrinterDriver() and AddPrinterEx() client RPC's
Also fixed init_unistr() to deal with a NULL source character string.
-jerry
(This used to be commit
8ecd5dd52a6bd867f5d117352048ee43ce7254d9)
Jeremy Allison [Wed, 9 Aug 2000 18:40:48 +0000 (18:40 +0000)]
Fixed memory leak with NT tokens.
Added debug messages to se_access_check().
Added FULL_ACCESS acl to default acl on printers.
Jeremy.
(This used to be commit
7507f6f408cf8b0f8d7e2b3da54ce5fb5ef5343b)
Andrew Tridgell [Wed, 9 Aug 2000 07:34:35 +0000 (07:34 +0000)]
got error code right for printer update/add failure
(This used to be commit
0d00d2ec258b36d73e865f06d5d11745d7cdafa9)
Andrew Tridgell [Wed, 9 Aug 2000 04:25:01 +0000 (04:25 +0000)]
add printer admin docs
(This used to be commit
1342f2e5be28d1582ab39ec837392fbf9e721014)
Andrew Tridgell [Wed, 9 Aug 2000 04:19:18 +0000 (04:19 +0000)]
added printer admin option
any user in that list can do anything to a printer
(This used to be commit
7b5912be150dd590d6195be40b0976305b8716ba)
Gerald Carter [Wed, 9 Aug 2000 02:04:25 +0000 (02:04 +0000)]
Fixed AddPrinterDriver()
jerry
(This used to be commit
39d025693eadf4ca1c4fe17dd9110bb8a647f361)
Andrew Tridgell [Wed, 9 Aug 2000 00:11:01 +0000 (00:11 +0000)]
fixed help string
(This used to be commit
16afa46797a4cdaa6e3b668caf6d910c08bec9b4)
Jeremy Allison [Tue, 8 Aug 2000 23:49:26 +0000 (23:49 +0000)]
Found the sec_ctx_stack overflow - a become_root() should have been an
unbecome_root() - typo.
Jeremy.
(This used to be commit
ebb160663ed55e44e44f1c3d17eb077a32c2ffb9)
Jeremy Allison [Tue, 8 Aug 2000 21:51:22 +0000 (21:51 +0000)]
Added SID "Everyone" S-1-1-0 as always matching if present in an ACE.
Jeremy.
(This used to be commit
b3a1038ac1bfb0c32e64f6cb26e5e46fbda794a2)
Jeremy Allison [Tue, 8 Aug 2000 19:34:34 +0000 (19:34 +0000)]
Changed the sec desc access checks to match the spec. Needs testing.
Jeremy.
(This used to be commit
5a4a7cd4727df5d1b5e71d343e776c7df52dc515)
Gerald Carter [Tue, 8 Aug 2000 07:23:20 +0000 (07:23 +0000)]
Gerald Carter [Tue, 8 Aug 2000 06:59:35 +0000 (06:59 +0000)]
cleanup in init_unistr2_from_unistr()
--jerry
(This used to be commit
1e00ac19cd001024fa8007eff5137aac877796fa)
Gerald Carter [Tue, 8 Aug 2000 06:57:48 +0000 (06:57 +0000)]
All changes related to rpcclient...
- 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)
Gerald Carter [Sat, 5 Aug 2000 19:18:25 +0000 (19:18 +0000)]
it is not my day it seems. :-(
Fixed missing )
j-
(This used to be commit
7b69cbbde36e51f8f7b74691428a04e8871d8b4a)
Gerald Carter [Sat, 5 Aug 2000 19:03:00 +0000 (19:03 +0000)]
removed the for() loop to copy the buffer in init_unistr2_from_unistr()
Replaced with a memcpy()
Forgot to commit this a few moments ago
j-
(This used to be commit
34d4fb54c3121d31cb8b29193f71d5e7b5471cdc)
Gerald Carter [Sat, 5 Aug 2000 18:58:45 +0000 (18:58 +0000)]
Fixed bug in init_unistr2_from_unistr() found by Elrond.
Thanks :-)
j-
(This used to be commit
4ecd15cd5851e94808756e3da0ce6a066f0a0cd7)
John Terpstra [Fri, 4 Aug 2000 21:03:10 +0000 (21:03 +0000)]
Adding build file.
(This used to be commit
b87c47cc8638a1930e55a45a126a778b188ce688)
John Terpstra [Fri, 4 Aug 2000 20:53:28 +0000 (20:53 +0000)]
Adding build system files for Caldera OpenLinux.
(This used to be commit
8de3786f5ad473aab90bb3fbf7e6ca2714f91751)
Gerald Carter [Fri, 4 Aug 2000 20:47:06 +0000 (20:47 +0000)]
Gerald Carter [Fri, 4 Aug 2000 20:32:34 +0000 (20:32 +0000)]
spoolss_addprinterex() was adding the printer and returning the
correct handle, but was deleting the connection to the server.
Doh!!
--jerry
(This used to be commit
8e5e929561a1ae954bd60f7bd745d697438f835c)
Jeremy Allison [Fri, 4 Aug 2000 19:56:58 +0000 (19:56 +0000)]
Fixed up se_access_check() to use the token list from the user struct
as the SID list. Now to go through and tidy up the algorithm.
Jeremy.
(This used to be commit
1f7300df6713a6728feb1600ca7e62fc213232fc)
Volker Lendecke [Fri, 4 Aug 2000 16:08:04 +0000 (16:08 +0000)]
Added my course notes. Had asked Jeremy some weeks ago.
It's german language, feel free to remove it again.
Volker
(This used to be commit
a40f22427a05903dfb98e9cb849698b33b8bca90)
Gerald Carter [Fri, 4 Aug 2000 13:30:52 +0000 (13:30 +0000)]
Gerald Carter [Fri, 4 Aug 2000 12:46:36 +0000 (12:46 +0000)]
clunky support for calling AddPrinterEx(). The code currently reports
that the call failed, but the printer shows up on the remote NT client.
(note this is the client side call). I've botched the return value
somewhere and will fix that today.
jerry
(This used to be commit
e15d9befd24cf5f3410c4be819b2a1fcf68048fb)
Gerald Carter [Fri, 4 Aug 2000 12:42:19 +0000 (12:42 +0000)]
After talking with Jeremy and JF (and staring at packet traces between
NT <-> NT), I've come to realize that UNISTR2 strings should be NULL
terminated.
jerry
(This used to be commit
c8f9e54beafcb0c0668f1510e7693dbf22485aa8)
Tim Potter [Fri, 4 Aug 2000 06:13:05 +0000 (06:13 +0000)]
In cli_error() return ENOENT when an ERROR_INVALID_NAME is received instead
of the generic EINVAL.
(This used to be commit
a290107aee01a85ca1ef5565f23c8f00e18e98c2)
Jeremy Allison [Fri, 4 Aug 2000 00:59:09 +0000 (00:59 +0000)]
Fixed up the user/group contexts when using authenticated pipes.
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)
Jeremy Allison [Thu, 3 Aug 2000 22:38:43 +0000 (22:38 +0000)]
Added an NT_USER_TOKEN structure that is copied/passed around associated
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)
Jeremy Allison [Wed, 2 Aug 2000 18:49:36 +0000 (18:49 +0000)]
Much though I hate to admit it - JF was completely correct. I cannot
now reproduce the bug I had with adding a printer driver, and PrintMig.exe
crashes if I use my SD code but works with his.
I stand completely corrected :-). - So I'm reverting to his code as it works :-).
Jeremy.
(This used to be commit
d6db29be98f717a9038b5ac1ff492c70ce2e92a7)
Jeremy Allison [Wed, 2 Aug 2000 02:11:55 +0000 (02:11 +0000)]
Started to canonicalize our handling of uid -> sid code in order to
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)
Jeremy Allison [Tue, 1 Aug 2000 18:32:34 +0000 (18:32 +0000)]
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.
(This used to be commit
c55bcec817f47d6162466b193d533c877194124a)
Jeremy Allison [Tue, 1 Aug 2000 00:41:19 +0000 (00:41 +0000)]
Added print job substitutions for %{printername}, %{sharename} and %{portname}
from the NT printer tdb.
Also added checks for time restrictions before allowing a job to print.
Jeremy.
(This used to be commit
8cfb55e81abebf0354e6d470ed68bbac1d6560ad)
Jeremy Allison [Mon, 31 Jul 2000 21:41:03 +0000 (21:41 +0000)]
Save & restore the port name correctly.
Jeremy.
(This used to be commit
c0648c981edef2a29b3a22a7d08aa226ca724e95)
Jeremy Allison [Mon, 31 Jul 2000 20:41:51 +0000 (20:41 +0000)]
Added John Reilly's enumports/addprinter/delprinter scripting code plus the
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)
Gerald Carter [Mon, 31 Jul 2000 15:17:29 +0000 (15:17 +0000)]
Gerald Carter [Mon, 31 Jul 2000 14:56:01 +0000 (14:56 +0000)]
More work on rpcclient...
* 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
d321d0dddd052b49c94bef8f214be7343337d907)
Gerald Carter [Mon, 31 Jul 2000 14:50:53 +0000 (14:50 +0000)]
More work on rpcclient...
* 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)
John Terpstra [Sun, 30 Jul 2000 07:40:18 +0000 (07:40 +0000)]
Adding pages oopsed.
(This used to be commit
7df53b821132f334d0752b757778818cae634d46)
John Terpstra [Sun, 30 Jul 2000 07:38:43 +0000 (07:38 +0000)]
Adding Using_Samba book back to Samba-pre3.
(This used to be commit
9f5f8ad21d9c7f5efb69abbe08ee2e34b787e68b)
John Terpstra [Sun, 30 Jul 2000 06:52:16 +0000 (06:52 +0000)]
Adding missing man pages.
(This used to be commit
25091dcf7c194b450e95e2a673423d2d0ad7f272)
John Terpstra [Sun, 30 Jul 2000 06:50:39 +0000 (06:50 +0000)]
Adding missing smbsh.1 man page source.
(This used to be commit
856a3773dcad4a8665e097a07e7bb992ffea4c74)
John Terpstra [Sun, 30 Jul 2000 06:37:46 +0000 (06:37 +0000)]
Updating for Samba-3.
(This used to be commit
183d55b2ae38305f68ca677f6d413a54bd122394)
John Terpstra [Sun, 30 Jul 2000 06:33:30 +0000 (06:33 +0000)]
Adding files provided by Klaus Singvogel of Caldera
(This used to be commit
ab6d01bdccf3106c00563173bfb3e3b3d7c3a64c)
Tim Potter [Fri, 28 Jul 2000 06:27:32 +0000 (06:27 +0000)]
Fixed read overrun in init_string2()
(This used to be commit
4ab75143c4466ad0ea8443512dd5ade449d72462)
Jean-François Micouleau [Thu, 27 Jul 2000 08:00:25 +0000 (08:00 +0000)]
remove warnings
J.F.
(This used to be commit
9178d2a1aac26f8d6533f7dc86ff9b19eb72db8b)
Jean-François Micouleau [Thu, 27 Jul 2000 07:59:39 +0000 (07:59 +0000)]
fix the devmode.orientation being set to 0.
that bug was *subtle* :-(
J.F.
(This used to be commit
0e9e048b6d65b57bdcc7440ddaa9d2cc1eac71dc)
Jeremy Allison [Thu, 27 Jul 2000 00:47:19 +0000 (00:47 +0000)]
Ok - this is a *BIG* change - but it fixes the problems with static strings
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)
Jean-François Micouleau [Wed, 26 Jul 2000 10:31:05 +0000 (10:31 +0000)]
if no comment in TDB, use comment from print share.
J.F.
(This used to be commit
c267b23620677a11f702bfea4885a28e66a05b05)
Jean-François Micouleau [Wed, 26 Jul 2000 09:40:49 +0000 (09:40 +0000)]
Found out that we are crashing spoolss in enumprinterdata.
So fixed enumprinterdatas in rpcclient to debug the server code,
and found that the parsing code was missing 2 prs_align().
We are not crashing NT anymore. :-)
J.F.
(This used to be commit
883f7402d495182aeff85152216cc8b3cfc18bef)
Tim Potter [Wed, 26 Jul 2000 03:55:17 +0000 (03:55 +0000)]
Fixed memory leaks in root and non-root password changing.
(This used to be commit
f3a4f81a5e51e411f1c7c6245597cca01e9ad5b2)
Tim Potter [Wed, 26 Jul 2000 03:38:30 +0000 (03:38 +0000)]
Fixed memory leaks in _spoolss_addprinterdriver()
(This used to be commit
1f49788442b0d1264c70166e727b8588b936e6ec)
Tim Potter [Wed, 26 Jul 2000 03:04:01 +0000 (03:04 +0000)]
Fixed memory leak in modify_trust_password()
(This used to be commit
7145689bf55b9f3100632badac486fde30ee4972)
Jeremy Allison [Tue, 25 Jul 2000 22:35:57 +0000 (22:35 +0000)]
Fixed up error checking and move printer file code. Fixed a memory leak.
Jeremy.
(This used to be commit
5130dd0f8b80aed5fb3c0df290b627057cc9b825)
Gerald Carter [Tue, 25 Jul 2000 21:14:49 +0000 (21:14 +0000)]
make proto
--jerry
(This used to be commit
1f65b13dd56fbe41320f6c4e8f391ce739509e45)
Gerald Carter [Tue, 25 Jul 2000 21:07:46 +0000 (21:07 +0000)]
some initial code for AddPrinterEx() project. Most is ifdef'd out
'cause it's not all written.
-jerry
(This used to be commit
2c0f6bcc8f926ee9c17de12671075e8a9239bb94)
Andrew Tridgell [Tue, 25 Jul 2000 20:26:50 +0000 (20:26 +0000)]
if the sids are not the same pointer and either of the sids are NULL
then the two sids are not equal
(This used to be commit
9ccf3b1dc5baf0e00d032d8b932ab0fb5b1e11b1)
Jeremy Allison [Tue, 25 Jul 2000 17:09:29 +0000 (17:09 +0000)]
Added some error checking and returns to the new 'move' code.
Jeremy.
(This used to be commit
0bd88d304cd773e0bbf3e6f7fedcb3b544d41cbe)
Jean-François Micouleau [Tue, 25 Jul 2000 13:15:16 +0000 (13:15 +0000)]
A rather big change set ! (listed in no particular order)
- 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)
Tim Potter [Tue, 25 Jul 2000 06:10:59 +0000 (06:10 +0000)]
Fix for mounting a printer as a share. Not that there's anything
specifically wrong with this, but Samba is fooled by the client into
thinking the printer is a file share. Files copied to the share gather
dust in the spool directory and aren't printed.
This patch has the effect of not allowing printers to be mounted as file
shares. Not sure whether this is the correct solution or not.
{Jeremy,JF,Tridge} please check!
(This used to be commit
dcf3249bb9fef2a05b376e9c8c1a0a7d602d8a2e)
Jeremy Allison [Tue, 25 Jul 2000 01:50:53 +0000 (01:50 +0000)]
Tidy up code to add printer. Always index in tdb by sharename. This
is beginning to come together...
Jeremy.
(This used to be commit
614bf56186b5836020a7813855a5108da0ee8433)
Tim Potter [Mon, 24 Jul 2000 06:20:13 +0000 (06:20 +0000)]
Run main server loop with sys_select() instead of sys_select_intr(). The
main daemon was not catching sighup and reloading the service file.
(This used to be commit
f026a897e9296a71fb5c4d5f6e1b4d3287689bde)
Tim Potter [Mon, 24 Jul 2000 06:18:21 +0000 (06:18 +0000)]
Test for reloading smb.conf after SIGHUP. Needs to be run as root.
(This used to be commit
db54e72d2f67b07d42bff16c64fbadf0d031e365)
Jeremy Allison [Sat, 22 Jul 2000 00:48:29 +0000 (00:48 +0000)]
Fixed open handle code in printers - 3 functions were always being done
in order - moved them into open_printer_hnd().
Added saving of comment field.
Jeremy.
(This used to be commit
a0ee774fe92e5d0bc84d1d6729e8c538c67e8aba)
Gerald Carter [Fri, 21 Jul 2000 20:10:52 +0000 (20:10 +0000)]
Gerald Carter [Fri, 21 Jul 2000 20:03:18 +0000 (20:03 +0000)]
* Added EnumPorts()
* Fixed an off-by-one bug noticed by JF in GetPrinterDriverDirectory()
jerry
(This used to be commit
a9522f560da64045d928dabedeacdef0a6c3db51)
Gerald Carter [Fri, 21 Jul 2000 20:01:20 +0000 (20:01 +0000)]
Added EnumPorts() and fixed up some problems
with the other spoolss client calls.
Also cleaned up output for 'help' command.
jerry
(This used to be commit
a0e8a55c279af50c1f770c7b913262094b9b593a)
Gerald Carter [Fri, 21 Jul 2000 19:59:51 +0000 (19:59 +0000)]
Added EnumPorts() and fixed up some problems
with the other spoolss client calls.
Also cleaned up output for 'help' command.
jerry
(This used to be commit
56ce247977c05ef37888c2572e679c44346e5568)
Gerald Carter [Fri, 21 Jul 2000 19:58:24 +0000 (19:58 +0000)]
Added functions for enumerating ports on remote print server.
Tim, You should also look at new_smb_io_printer_info_2()
and see if the change from NULL to &i regarding the secdesc is ok.
jerry
(This used to be commit
a2205c6646aa677090908a4e1532ed8590adc0e0)
Gerald Carter [Thu, 20 Jul 2000 13:52:02 +0000 (13:52 +0000)]
Gerald Carter [Thu, 20 Jul 2000 13:39:51 +0000 (13:39 +0000)]
readded util_list.c (just to the RPCCLIENT_OBJ). I need to split
the file up i think. Later.
--jerry
(This used to be commit
ed54a9f4d154ac56330b23255108447036cbd192)
Gerald Carter [Thu, 20 Jul 2000 13:38:48 +0000 (13:38 +0000)]
Fixed unitilized secdesc pointer which was causing spoolgetprinter
rpcclient command to fail on shared printers.
jerry
(This used to be commit
c8abc31187dbfe6076277896b029fa11443e43bd)
Jeremy Allison [Wed, 19 Jul 2000 23:47:10 +0000 (23:47 +0000)]
Modified the patch to look in the tdb *first* - thus allowing legacy text
filed to be ignored when an upload is done.
Modified to code to goto err on problems, simplifies it.
Jeremy.
(This used to be commit
9157a6ab2646c035a731d53aa3be010488ccf51a)
Jeremy Allison [Wed, 19 Jul 2000 20:11:11 +0000 (20:11 +0000)]
Code from John Reilly <jreilly@hp.com> to add tdb lookups into the Win95
printer driver download if looking for the default driver files fail.
Jeremy.
(This used to be commit
1192d867c4e863471f9bc12afceb68a23ba2142e)
Christopher R. Hertel [Wed, 19 Jul 2000 05:32:43 +0000 (05:32 +0000)]
Instead of handing back a string (which might be a DNS name or an IP
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)