bbaumbach/samba-autobuild/.git
19 years agoadded a little description of useage and output format since this gives
Herb Lewis [Mon, 28 Aug 2000 18:58:46 +0000 (18:58 +0000)]
added a little description of useage and output format since this gives
more info than just what parameters are not supported by SWAT.
(This used to be commit 7db533cb47a0d9bc88219dbe48e96ceed45a65a1)

19 years agofixed typos spotted by Ron Alexander <rcalex@home.com>
Gerald Carter [Mon, 28 Aug 2000 13:41:46 +0000 (13:41 +0000)]
fixed typos spotted by Ron Alexander <rcalex@home.com>

--jerry
(This used to be commit 9fbcede92f558fdcda257338798613cffa4e2cb6)

19 years agoscript written by herb for reporting which smb.conf parameters
Gerald Carter [Mon, 28 Aug 2000 13:35:10 +0000 (13:35 +0000)]
script written by herb for reporting which smb.conf parameters
are in loarparm.c but not supported by SWAT.  I just thought it looked fun.
:-)

--jerry
(This used to be commit eb20a2c6f478688b82ce8346fea618aebbfc9295)

19 years agoMerge bug - still getting used to dirdiff.
Tim Potter [Mon, 28 Aug 2000 07:25:18 +0000 (07:25 +0000)]
Merge bug - still getting used to dirdiff.
(This used to be commit cb717b4a2bb55eb2ff008e59203ebfeac6c5ab9f)

19 years agoOops - missed a file.
Tim Potter [Mon, 28 Aug 2000 06:50:45 +0000 (06:50 +0000)]
Oops - missed a file.
(This used to be commit 5aed84b74981a4f4fcc4d466ef03178eff22ba85)

19 years agoMerge from appliance branch.
Tim Potter [Mon, 28 Aug 2000 06:46:53 +0000 (06:46 +0000)]
Merge from appliance branch.
(This used to be commit 567b0095b1b8393b3b1e32533aa2860ab3dbfa47)

19 years agoyipee!
Andrew Tridgell [Mon, 28 Aug 2000 04:42:31 +0000 (04:42 +0000)]
yipee!

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)

19 years agomade reopen_logs() always re-open logs, not try and be smart about not
Andrew Tridgell [Mon, 28 Aug 2000 03:17:22 +0000 (03:17 +0000)]
made reopen_logs() always re-open logs, not try and be smart about not
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)

19 years agoarrgh.
Andrew Tridgell [Mon, 28 Aug 2000 02:06:25 +0000 (02:06 +0000)]
arrgh.

whoever added "auto" parameters in loadparam only supported "True", "False"
and "Auto", and did not support "Yes" and "No" like booleans. This
means anyone using "preferred master = yes" didn't get what they
expected!
(This used to be commit 311a4dfb9a9a39a54dcb47d83e1604ad7461dce4)

19 years agovfs write data fix. Fix for name matching in addtosmbpass
Jeremy Allison [Fri, 25 Aug 2000 20:44:33 +0000 (20:44 +0000)]
vfs write data fix. Fix for name matching in addtosmbpass
Jeremy.
(This used to be commit 85738b7ee1ea6d88999d6aedc51a2daf545cb8b8)

19 years agoReplaced "\\MAILSLOT\\NET\\NETLOGON" with NET_LOGON_MAILSLOT constant.
Tim Potter [Fri, 25 Aug 2000 04:18:50 +0000 (04:18 +0000)]
Replaced "\\MAILSLOT\\NET\\NETLOGON" with NET_LOGON_MAILSLOT constant.
(This used to be commit 5764e84c0e01fa4d6ecba410542f6f5c63b9eae6)

19 years ago- fixed the %U macro so that the old (and documented) semantics work
Andrew Tridgell [Fri, 25 Aug 2000 03:58:02 +0000 (03:58 +0000)]
- fixed the %U macro so that the old (and documented) semantics work
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)

19 years agoUpdated file with version in TNG.
Tim Potter [Fri, 25 Aug 2000 00:55:27 +0000 (00:55 +0000)]
Updated file with version in TNG.
(This used to be commit 156e17dea48962bca98a3f7d1e876eb6047ebc8a)

19 years agoModified to use sid_to_uid and sid_to_gid. Now ready for POSIX ACL
Jeremy Allison [Thu, 24 Aug 2000 19:48:31 +0000 (19:48 +0000)]
Modified to use sid_to_uid and sid_to_gid. Now ready for POSIX ACL
code....
Jeremy.
(This used to be commit 28586c1dee18d99e0e0999ab1a945a33ce33c371)

19 years agoTidied up some error returns from printing calls. Still need to map UNIX
Jeremy Allison [Wed, 23 Aug 2000 23:05:49 +0000 (23:05 +0000)]
Tidied up some error returns from printing calls. Still need to map UNIX
errors to NT error for print job failure returns. Patch from John Reilly at HP.
Jeremy.
(This used to be commit 3514b5bb8fffd78e3647425d93b74e2e6291bafc)

19 years agoDocumentation on NT_USER_TOKEN. Requested by Sander.
Jeremy Allison [Wed, 23 Aug 2000 17:38:52 +0000 (17:38 +0000)]
Documentation on NT_USER_TOKEN. Requested by Sander.
Jeremy.
(This used to be commit e203324d4a3b9aac99ed0b22cbd8c373461919dd)

19 years agoAdded code to do SID to uid/gid conversion. Needed for ACL support.
Jeremy Allison [Wed, 23 Aug 2000 00:45:40 +0000 (00:45 +0000)]
Added code to do SID to uid/gid conversion. Needed for ACL support.
Jeremy.
(This used to be commit 81c5380f91839b6416c8a42739dadf00e7388528)

19 years agoPatch from John Reilly <jreilly@hp.com> for not processing duplicate files
Tim Potter [Tue, 22 Aug 2000 06:28:33 +0000 (06:28 +0000)]
Patch from John Reilly <jreilly@hp.com> for not processing duplicate files
when moving printer driver to download area.
(This used to be commit 6e0c9079c385a4f0e61d9f1b1e0351bc4dbc3151)

19 years agoFix for safe_free freeing static strings. From Robert August Vincent, II.
Jeremy Allison [Mon, 21 Aug 2000 19:30:19 +0000 (19:30 +0000)]
Fix for safe_free freeing static strings. From Robert August Vincent, II.
Jeremy.
(This used to be commit bd844fcd3023ab956eb7ab369475955a88bcca14)

19 years agooops. must return "" string and length zero when strlen(filebuf) == 0
Luke Leighton [Fri, 18 Aug 2000 06:27:24 +0000 (06:27 +0000)]
oops.  must return "" string and length zero when strlen(filebuf) == 0
(This used to be commit d3bc7cca99e47ce89035a03022d7c3ec69e01636)

19 years agofixed an off by one error where I was tromping on memory
Gerald Carter [Fri, 18 Aug 2000 06:03:13 +0000 (06:03 +0000)]
fixed an off by one error where I was tromping on memory
when initializing a driver_info_3 struct.  See spoolss_addprinterdriver()

jerry
(This used to be commit 4fad1fc28a0396443e4723d2065860feb283a785)

19 years agofixed initialization errors (again!) I must have forgot to
Gerald Carter [Fri, 18 Aug 2000 05:57:09 +0000 (05:57 +0000)]
fixed initialization errors (again!)  I must have forgot to
check these in before.

jerry
(This used to be commit e682d6a599934e5460abe0d30cb2465fa80c7937)

19 years agogetfileline() - line with length of zero -> filebuf[strlen(filebuf)-1]
Luke Leighton [Fri, 18 Aug 2000 05:56:19 +0000 (05:56 +0000)]
getfileline() - line with length of zero -> filebuf[strlen(filebuf)-1]
is NOT ok.
(This used to be commit 24e0c8ef70dc59bfaaa113c3d44befbccbcba15f)

19 years agochanging some debug message levels
Gerald Carter [Fri, 18 Aug 2000 05:55:37 +0000 (05:55 +0000)]
changing some debug message levels

j-
(This used to be commit facef51be4e3f3be75613f39c8dfedfa7410552c)

19 years agoFix for Win9x driver downloads when information is
Gerald Carter [Thu, 17 Aug 2000 20:05:05 +0000 (20:05 +0000)]
Fix for Win9x driver downloads when information is
stored in the TDB.  See the message I posted about
this on samba-technical

* If the admin does not desire the new NT print driver
support, nothing needs to be done.  All existing
parameters work the same.

* If the admin wants to take advantage of NT printer
driver support but does not want to migrate the 9x drivers
to the new setup, the leave the existing printers.def
file.  When smbd attempts to locate a 9x driver for the
printer in the TDB and fails it will drop down to
using the printers.def (and all associated parameters).
The make_printerdef tool will also remain for backwards
compatibility but will be moved to the "this tool is the
old way of doing it" pile.

* If the admin installs a 9x driver for a printer on
a Samba host (in the printing TDB), this information will
take precedence and the three old printing parameters
will be ignored (including print driver location).

* If an admin wants to migrate the printers.def file into
the new setup, I can write a script to do this using
rpcclient.  The main problem is the driver namespace
(we need the NT driver name first in order to
be consistent).

jerry
(This used to be commit ac049f8bf348810dc068382fdbc6635a2015d36a)

19 years agoadded comment for my own memory purposes
Gerald Carter [Thu, 17 Aug 2000 20:03:53 +0000 (20:03 +0000)]
added comment for my own memory purposes

jerry
(This used to be commit b64ddbd1aaba8811641e502e96f3bbef01171f52)

19 years agohack for unmarshalling unistr's on machines with BIG_ENDIAN arch
Gerald Carter [Wed, 16 Aug 2000 03:44:04 +0000 (03:44 +0000)]
hack for unmarshalling unistr's on machines with BIG_ENDIAN arch
I think we have a lot more of these bugs lurking (i'm fairly
confident of it).

jerry
(This used to be commit 3b14487c7e5218ff3e0ff3118ca1afd706e05247)

19 years ago- fixed memcpy bug in copy_unistr2()
Gerald Carter [Wed, 16 Aug 2000 03:41:02 +0000 (03:41 +0000)]
- fixed memcpy bug in copy_unistr2()
- init_unistr2_from_unistr() does not NULL terminate
  the buffer

--jerry
(This used to be commit 65ee5f9b6ed3c4ad33fefd3c879f2649496fd3f3)

19 years agofixed unitialized struct bug in enum_users (whatever it is called)
Gerald Carter [Wed, 16 Aug 2000 03:38:52 +0000 (03:38 +0000)]
fixed unitialized struct bug in enum_users (whatever it is called)

jerry
(This used to be commit a606131508592d72f3fd8a0dd63073e9c559062f)

19 years agofixed typo.
Gerald Carter [Wed, 16 Aug 2000 03:34:58 +0000 (03:34 +0000)]
fixed typo.

jerry
(This used to be commit f00a330b3e7900bc325802b2a252a392a16a8b2a)

19 years agofixed error in [public] spotted by Ron Alexander <rcalex@home.com>
Gerald Carter [Tue, 15 Aug 2000 23:36:05 +0000 (23:36 +0000)]
fixed error in [public] spotted by Ron Alexander <rcalex@home.com>
changed to read only = yes

jerry
(This used to be commit e17753c532ab6d5ae628c6e6f6d5b810638cb314)

19 years agoMerge of uninitialised variable fix from APPLIANCE_HEAD.
Tim Potter [Tue, 15 Aug 2000 21:09:54 +0000 (21:09 +0000)]
Merge ... uninitialised variable fix from APPLIANCE_HEAD.
(This used to be commit 20a7fefee8c85f02f6a0e2a02c0df04a8b22b7cb)

19 years agoTidied up extra ()'s.
Jeremy Allison [Tue, 15 Aug 2000 02:33:27 +0000 (02:33 +0000)]
Tidied up extra ()'s.
Jeremy
(This used to be commit f94f37dcab2bc2b68e2b6b4ca440ad53a60e8117)

19 years agoReverted the change Luke made. Removed IS_BITS_SET_XX macros.
Jeremy Allison [Mon, 14 Aug 2000 23:48:07 +0000 (23:48 +0000)]
Reverted the change Luke made. Removed IS_BITS_SET_XX macros.
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)

20 years agoMerge.
Tim Potter [Mon, 14 Aug 2000 21:27:54 +0000 (21:27 +0000)]
Merge.
(This used to be commit 604f6a34effb8aeed7701345a4219749a6a97892)

20 years agofixed a few bugs in new_smb_io_relarraystr().
Gerald Carter [Mon, 14 Aug 2000 21:18:02 +0000 (21:18 +0000)]
fixed a few bugs in new_smb_io_relarraystr().
Marshalling code path now uses spoolss_smb_io_unistr()
also caught a NULL pointer case.

i'll update TNG later.
(This used to be commit bd4c83eb40a14baf447ac88886d4eafe7b9a309f)

20 years agoNT printer permissions test program.
Tim Potter [Mon, 14 Aug 2000 18:39:51 +0000 (18:39 +0000)]
NT printer permissions test program.
(This used to be commit 9af82423d2e5c6f873a906097a56c8ac6c5f8297)

20 years agorestored IS_BITS_SET_xxx macros.
Luke Leighton [Mon, 14 Aug 2000 11:03:30 +0000 (11:03 +0000)]
restored IS_BITS_SET_xxx macros.
(This used to be commit bc065f9597654666e2f26ec046e058e44247d6e3)

20 years agohey, jerry: turns out you _have_ converted to get_safe_nt_errmsg!!!
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)

20 years agojeremy,
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)

20 years agominor formatting fixes.
Gerald Carter [Mon, 14 Aug 2000 03:18:17 +0000 (03:18 +0000)]
minor formatting fixes.

jerry
(This used to be commit 95355d2cf26f51b1f928b8a020a4a731483be0b8)

20 years agofix for new_smb_io_relarraystr() and new_smb_io_relstr()
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)

20 years agoremoved the prs_align in spoolss_smb_io_unistr() (JF, please check)
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)

20 years agofixes to prs_unistr UNMARSHALLING only. Problem was due to talloc's
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)

20 years agoFIxed some unmarshalling problems with relstr and unistr arrays
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)

20 years agofixed unistr_to_ascii to deal with NULL src strings
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)

20 years agoreworked talloc() to in order to help track down invalid
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)

20 years agoremoved (void) typecast from SMB_ASSERT
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)

20 years agoUpdated by Patrick Powell <papowell@lprng.org>
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)

20 years agoFixed the problem with UNISTR marshalling in a buffer5 struct.
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)

20 years agoFirst shot at actually *doing* WINS failover.
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)

20 years agoFix case where volumename could be returned as UNIX charset or DOS codepage
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)

20 years agoAdded "add_printer_hook" call to update printer for Win9x clients.
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)

20 years agoTidied up security rights definitions.
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)

20 years agoRemoved requirement that sid have an owner before being interpreted.
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)

20 years agoWorking on spoolss_getprinterdriver() as it does not display all the
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)

20 years agoworking on the unmarshalling of dependentfiles to a DRIVER_INFO_3
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)

20 years agocode formatting cleanup
Gerald Carter [Thu, 10 Aug 2000 14:02:07 +0000 (14:02 +0000)]
code formatting cleanup

jerry
(This used to be commit 4bc5b8aa345b963e1247c6a364ba48a08fbd9764)

20 years agodeal with allocation size of 0 in prs_unistr when UNMARSHALLING
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)

20 years agoDeal will NULL UNISTR in unistr_to_ascii
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)

20 years agotalloc returns 0xdeadbeef when asked to allocate 0 bytes
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)

20 years agoNeeded to add the SHARED attribute bit when creating a printer
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)

20 years agoFixed bug in new printer access check code. If PRINTER_ALL_ACCESS is changed
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)

20 years agomake proto
Gerald Carter [Wed, 9 Aug 2000 20:19:37 +0000 (20:19 +0000)]
make proto
(This used to be commit ad74885e4730da2a15ff00e13f490f3f0b1be10d)

20 years agoMore work on AddPrinterDriver() and AddPrinterEx() client RPC's
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)

20 years agoFixed memory leak with NT tokens.
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)

20 years agogot error code right for printer update/add failure
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)

20 years agoadd printer admin docs
Andrew Tridgell [Wed, 9 Aug 2000 04:25:01 +0000 (04:25 +0000)]
add printer admin docs
(This used to be commit 1342f2e5be28d1582ab39ec837392fbf9e721014)

20 years agoadded printer admin option
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)

20 years agoFixed AddPrinterDriver()
Gerald Carter [Wed, 9 Aug 2000 02:04:25 +0000 (02:04 +0000)]
Fixed AddPrinterDriver()

jerry
(This used to be commit 39d025693eadf4ca1c4fe17dd9110bb8a647f361)

20 years agofixed help string
Andrew Tridgell [Wed, 9 Aug 2000 00:11:01 +0000 (00:11 +0000)]
fixed help string
(This used to be commit 16afa46797a4cdaa6e3b668caf6d910c08bec9b4)

20 years agoFound the sec_ctx_stack overflow - a become_root() should have been an
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)

20 years agoAdded SID "Everyone" S-1-1-0 as always matching if present in an ACE.
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)

20 years agoChanged the sec desc access checks to match the spec. Needs testing.
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)

20 years agomake proto
Gerald Carter [Tue, 8 Aug 2000 07:23:20 +0000 (07:23 +0000)]
make proto
(This used to be commit 74074072cf244d221f8f9b09302d0cbc85d689d4)

20 years agocleanup in init_unistr2_from_unistr()
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)

20 years agoAll changes related to rpcclient...
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)

20 years agoit is not my day it seems. :-(
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)

20 years agoremoved the for() loop to copy the buffer in init_unistr2_from_unistr()
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)

20 years agoFixed bug in init_unistr2_from_unistr() found by Elrond.
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)

20 years agoAdding build file.
John Terpstra [Fri, 4 Aug 2000 21:03:10 +0000 (21:03 +0000)]
Adding build file.
(This used to be commit b87c47cc8638a1930e55a45a126a778b188ce688)

20 years agoAdding build system files for Caldera OpenLinux.
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)

20 years agomake proto
Gerald Carter [Fri, 4 Aug 2000 20:47:06 +0000 (20:47 +0000)]
make proto
(This used to be commit dfd6b51bc7fb61d25af3074c386ce51cf3bc86f4)

20 years agospoolss_addprinterex() was adding the printer and returning the
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)

20 years agoFixed up se_access_check() to use the token list from the user struct
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)

20 years agoAdded my course notes. Had asked Jeremy some weeks ago.
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)

20 years agomake proto
Gerald Carter [Fri, 4 Aug 2000 13:30:52 +0000 (13:30 +0000)]
make proto
(This used to be commit 6bdb7d5c9787bd16e851f5c751d952c4df8ccc5b)

20 years agoclunky support for calling AddPrinterEx(). The code currently reports
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)

20 years agoAfter talking with Jeremy and JF (and staring at packet traces between
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)

20 years agoIn cli_error() return ENOENT when an ERROR_INVALID_NAME is received instead
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)

20 years agoFixed up the user/group contexts when using authenticated pipes.
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)

20 years agoAdded an NT_USER_TOKEN structure that is copied/passed around associated
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)

20 years agoMuch though I hate to admit it - JF was completely correct. I cannot
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)

20 years agoStarted to canonicalize our handling of uid -> sid code in order to
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)

20 years agoTidyup removing many of the 0xC0000000 | NT_STATUS_XXX stuff (only need NT_STATUS_XXX).
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)

20 years agoAdded print job substitutions for %{printername}, %{sharename} and %{portname}
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)

20 years agoSave & restore the port name correctly.
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)

20 years agoAdded John Reilly's enumports/addprinter/delprinter scripting code plus the
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)

20 years agomake proto
Gerald Carter [Mon, 31 Jul 2000 15:17:29 +0000 (15:17 +0000)]
make proto
(This used to be commit 38b07395566a2c114ccda173fb0fe88cf7683588)

20 years agoMore work on rpcclient...
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)