tprouty/samba.git
24 years agoMerge.
Tim Potter [Mon, 14 Aug 2000 21:27:54 +0000 (21:27 +0000)]
Merge.

24 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.

24 years agoNT printer permissions test program.
Tim Potter [Mon, 14 Aug 2000 18:39:51 +0000 (18:39 +0000)]
NT printer permissions test program.

24 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.

24 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...

24 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.

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

jerry

24 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

24 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

24 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

24 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

24 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

24 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

24 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

24 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>

24 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.

24 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 -)-----

24 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.

24 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.

24 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.

24 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.

24 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

24 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

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

jerry

24 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

24 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

24 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

24 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

24 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.

24 years agomake proto
Gerald Carter [Wed, 9 Aug 2000 20:19:37 +0000 (20:19 +0000)]
make proto

24 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

24 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.

24 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

24 years agoadd printer admin docs
Andrew Tridgell [Wed, 9 Aug 2000 04:25:01 +0000 (04:25 +0000)]
add printer admin docs

24 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

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

jerry

24 years agofixed help string
Andrew Tridgell [Wed, 9 Aug 2000 00:11:01 +0000 (00:11 +0000)]
fixed help string

24 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.

24 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.

24 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.

24 years agomake proto
Gerald Carter [Tue, 8 Aug 2000 07:23:20 +0000 (07:23 +0000)]
make proto

24 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

24 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

24 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-

24 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-

24 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-

24 years agoAdding build file.
John Terpstra [Fri, 4 Aug 2000 21:03:10 +0000 (21:03 +0000)]
Adding build file.

24 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.

24 years agomake proto
Gerald Carter [Fri, 4 Aug 2000 20:47:06 +0000 (20:47 +0000)]
make proto

24 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

24 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.

24 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

24 years agomake proto
Gerald Carter [Fri, 4 Aug 2000 13:30:52 +0000 (13:30 +0000)]
make proto

24 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

24 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

24 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.

24 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.

24 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.

24 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.

24 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.

24 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.

24 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.

24 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.

24 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.

24 years agomake proto
Gerald Carter [Mon, 31 Jul 2000 15:17:29 +0000 (15:17 +0000)]
make proto

24 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

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

24 years agoAdding pages oopsed.
John Terpstra [Sun, 30 Jul 2000 07:40:18 +0000 (07:40 +0000)]
Adding pages oopsed.

24 years agoAdding Using_Samba book back to Samba-pre3.
John Terpstra [Sun, 30 Jul 2000 07:38:43 +0000 (07:38 +0000)]
Adding Using_Samba book back to Samba-pre3.

24 years agoAdding missing man pages.
John Terpstra [Sun, 30 Jul 2000 06:52:16 +0000 (06:52 +0000)]
Adding missing man pages.

24 years agoAdding missing smbsh.1 man page source.
John Terpstra [Sun, 30 Jul 2000 06:50:39 +0000 (06:50 +0000)]
Adding missing smbsh.1 man page source.

24 years agoUpdating for Samba-3.
John Terpstra [Sun, 30 Jul 2000 06:37:46 +0000 (06:37 +0000)]
Updating for Samba-3.

24 years agoAdding files provided by Klaus Singvogel of Caldera
John Terpstra [Sun, 30 Jul 2000 06:33:30 +0000 (06:33 +0000)]
Adding files provided by Klaus Singvogel of Caldera

24 years agoFixed read overrun in init_string2()
Tim Potter [Fri, 28 Jul 2000 06:27:32 +0000 (06:27 +0000)]
Fixed read overrun in init_string2()

24 years agoremove warnings
Jean-François Micouleau [Thu, 27 Jul 2000 08:00:25 +0000 (08:00 +0000)]
remove warnings

J.F.

24 years agofix the devmode.orientation being set to 0.
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.

24 years agoOk - this is a *BIG* change - but it fixes the problems with static strings
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.

24 years agoif no comment in TDB, use comment from print share.
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.

24 years agoFound out that we are crashing spoolss in enumprinterdata.
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.

24 years agoFixed memory leaks in root and non-root password changing.
Tim Potter [Wed, 26 Jul 2000 03:55:17 +0000 (03:55 +0000)]
Fixed memory leaks in root and non-root password changing.

24 years agoFixed memory leaks in _spoolss_addprinterdriver()
Tim Potter [Wed, 26 Jul 2000 03:38:30 +0000 (03:38 +0000)]
Fixed memory leaks in _spoolss_addprinterdriver()

24 years agoFixed memory leak in modify_trust_password()
Tim Potter [Wed, 26 Jul 2000 03:04:01 +0000 (03:04 +0000)]
Fixed memory leak in modify_trust_password()

24 years agoFixed up error checking and move printer file code. Fixed a memory leak.
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.

24 years agomake proto
Gerald Carter [Tue, 25 Jul 2000 21:14:49 +0000 (21:14 +0000)]
make proto

--jerry

24 years agosome initial code for AddPrinterEx() project. Most is ifdef'd out
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

24 years agoif the sids are not the same pointer and either of the sids are NULL
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

24 years agoAdded some error checking and returns to the new 'move' code.
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.

24 years agoA rather big change set ! (listed in no particular order)
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.

24 years agoFix for mounting a printer as a share. Not that there's anything
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!

24 years agoTidy up code to add printer. Always index in tdb by sharename. This
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.

24 years agoRun main server loop with sys_select() instead of sys_select_intr(). The
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.

24 years agoTest for reloading smb.conf after SIGHUP. Needs to be run as root.
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.

24 years agoFixed open handle code in printers - 3 functions were always being done
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.

24 years agomake proto
Gerald Carter [Fri, 21 Jul 2000 20:10:52 +0000 (20:10 +0000)]
make proto

24 years ago* Added EnumPorts()
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

24 years agoAdded EnumPorts() and fixed up some problems
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

24 years agoAdded EnumPorts() and fixed up some problems
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

24 years agoAdded functions for enumerating ports on remote print server.
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

24 years agomake proto
Gerald Carter [Thu, 20 Jul 2000 13:52:02 +0000 (13:52 +0000)]
make proto

24 years agoreadded util_list.c (just to the RPCCLIENT_OBJ). I need to split
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