ira/wip.git
23 years agoa simple test program I use to test the debug message system
Andrew Tridgell [Mon, 11 Sep 2000 07:03:10 +0000 (07:03 +0000)]
a simple test program I use to test the debug message system

23 years agothe first cut of the internal messaging system.
Andrew Tridgell [Mon, 11 Sep 2000 07:02:43 +0000 (07:02 +0000)]
the first cut of the internal messaging system.

The motivation for this system is to replace the UDP message for
oplocks, but this commit only does the "set debug level" message.

23 years agoImplemented DELETEPRINTERDATA (tested with Gerald's Win32 progs).
Jeremy Allison [Sat, 9 Sep 2000 00:19:35 +0000 (00:19 +0000)]
Implemented DELETEPRINTERDATA (tested with Gerald's Win32 progs).
Jeremy.

23 years agoFixed up get_a_printer_driver_3 so it looks in the tdb using the correct
Jeremy Allison [Fri, 8 Sep 2000 21:24:45 +0000 (21:24 +0000)]
Fixed up get_a_printer_driver_3 so it looks in the tdb using the correct
key name for a driver info. Version needs to be adjusted in the same
way that it is adjusted when the driver info is stored in the tdb.
AddPrinterConnection() Win32 call caught this one.
Jeremy.

23 years agoFixed typo where docname was being checked for datatype - was causing
Jeremy Allison [Fri, 8 Sep 2000 02:20:48 +0000 (02:20 +0000)]
Fixed typo where docname was being checked for datatype - was causing
STARTDOCPRINTER call to fail. I *love* Gerald's test code :-).
Jeremy.

23 years agoWin32 API is explicit that EnumPrinterData returns ERROR_MORE_DATA not
Jeremy Allison [Fri, 8 Sep 2000 00:28:07 +0000 (00:28 +0000)]
Win32 API is explicit that EnumPrinterData returns ERROR_MORE_DATA not
ERROR_INSUFICIENT_BUFFER when working out what space is needed. This fix
gives us the same return that WinNT does.
Jeremy.

23 years agoFixed the printerdata code to return NO_MORE_ITEMS if a size is requested
Jeremy Allison [Thu, 7 Sep 2000 20:56:24 +0000 (20:56 +0000)]
Fixed the printerdata code to return NO_MORE_ITEMS if a size is requested
and the parameter index doesn't exist. I think this code can be simplified
considerably, but JF needs to check to be sure.
Jeremy.

23 years agoAdded code to return NO_MORE_ENTRIES when trying to determine
Jeremy Allison [Thu, 7 Sep 2000 19:12:59 +0000 (19:12 +0000)]
Added code to return NO_MORE_ENTRIES when trying to determine
size using "NT mega hack". I think this is the correct thing to
do but JF should also examine the.
Jeremy.

23 years agoHopefully this should fix the primary group permission problem.
Tim Potter [Thu, 7 Sep 2000 08:43:05 +0000 (08:43 +0000)]
Hopefully this should fix the primary group permission problem.

23 years agoTemporary fix to convert from level6 (Win2k) to level 3 (NT4)
Jeremy Allison [Wed, 6 Sep 2000 23:20:35 +0000 (23:20 +0000)]
Temporary fix to convert from level6 (Win2k) to level 3 (NT4)
for driver download files.
Jeremy.

23 years agoFix from John Reilly for double free of printer struct.
Jeremy Allison [Wed, 6 Sep 2000 01:55:36 +0000 (01:55 +0000)]
Fix from John Reilly for double free of printer struct.
Jeremy.

23 years agoFix for the SID history problem when using a Win2k domain controller
Jeremy Allison [Wed, 6 Sep 2000 01:06:39 +0000 (01:06 +0000)]
Fix for the SID history problem when using a Win2k domain controller
with security=domain. Also fixed to dynamically allocate the SIDs and GIDs.
Jeremy.

23 years agoImplemented GETFORM tested and working using Gerald's Win32 test progs....
Jeremy Allison [Tue, 5 Sep 2000 20:56:09 +0000 (20:56 +0000)]
Implemented GETFORM tested and working using Gerald's Win32 test progs....
Jeremy.

23 years agoChanges from APPLIANCE_HEAD (per Tim Potter):
David O'Neill [Fri, 1 Sep 2000 18:49:26 +0000 (18:49 +0000)]
Changes from APPLIANCE_HEAD (per Tim Potter):
- 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

23 years agoFix from John Reilly @ HP for my typo with the parameters being reversed. Ooops.
Jeremy Allison [Fri, 1 Sep 2000 17:13:44 +0000 (17:13 +0000)]
Fix from John Reilly @ HP for my typo with the parameters being reversed. Ooops.
Jeremy.

23 years ago-U% should be an anonymous connection. Fixed bug where
Gerald Carter [Fri, 1 Sep 2000 06:25:15 +0000 (06:25 +0000)]
-U% should be an anonymous connection.  Fixed bug where
the password was being set to "" instead of NULL.

..and yes Elrond, I'll merge this into TNG.

P
jerry

23 years agoFix for swat to return correct MIME type for text files. From "Ron
Tim Potter [Fri, 1 Sep 2000 02:06:20 +0000 (02:06 +0000)]
Fix for swat to return correct MIME type for text files.  From "Ron
Alexander" <rcalex@home.com>

23 years agoImplemented DELETEFORM tested using Gerald's Win32 test code :-).
Jeremy Allison [Thu, 31 Aug 2000 19:04:51 +0000 (19:04 +0000)]
Implemented DELETEFORM tested using Gerald's Win32 test code :-).
Jeremy.

23 years agomake sure a couple of variables are initialised
Andrew Tridgell [Thu, 31 Aug 2000 07:11:59 +0000 (07:11 +0000)]
make sure a couple of variables are initialised

23 years agofixed "admin users" option with new security code
Andrew Tridgell [Thu, 31 Aug 2000 07:11:45 +0000 (07:11 +0000)]
fixed "admin users" option with new security code

23 years agoRemoved compiler warning.
Tim Potter [Thu, 31 Aug 2000 04:27:38 +0000 (04:27 +0000)]
Removed compiler warning.

23 years agoFixed overrun write error when using debuglevel > 50.
Jeremy Allison [Wed, 30 Aug 2000 22:54:54 +0000 (22:54 +0000)]
Fixed overrun write error when using debuglevel > 50.
Jeremy.

23 years agoFixed error returns for moving printer driver files around so generic
Jeremy Allison [Wed, 30 Aug 2000 21:09:21 +0000 (21:09 +0000)]
Fixed error returns for moving printer driver files around so generic
"Access denied" isn't always returned. More fixes found using Gerald's
wonderful Win32 test progs :-).
Jeremy.

23 years agoAdded vfs_unlink call to ensure vfs is used on unlink from client.
Jeremy Allison [Wed, 30 Aug 2000 18:33:56 +0000 (18:33 +0000)]
Added vfs_unlink call to ensure vfs is used on unlink from client.
Jeremy.

23 years agoFix for bind interfaces only sometimes picking the wrong IP address
Jeremy Allison [Wed, 30 Aug 2000 17:34:35 +0000 (17:34 +0000)]
Fix for bind interfaces only sometimes picking the wrong IP address
for a name query. From Steve Langasek <vorlon@netexpress.net>.
Jeremy.

23 years agoImplemented AbortPrinter() from Gerald's Win32 test code. Just purge all
Jeremy Allison [Wed, 30 Aug 2000 00:45:59 +0000 (00:45 +0000)]
Implemented AbortPrinter() from Gerald's Win32 test code. Just purge all
possible printjobs from that printer (I think this is correct).
Added error code returns for print_queue_XXX() functions.
Jeremy.

23 years agomissed removing the static declaration of strwicmp()
Gerald Carter [Tue, 29 Aug 2000 16:47:20 +0000 (16:47 +0000)]
missed removing the static declaration of strwicmp()

jerry

23 years agomake proto
Gerald Carter [Tue, 29 Aug 2000 14:57:37 +0000 (14:57 +0000)]
make proto

23 years agoadded -P (for no prompt) and -A <authfile> options
Gerald Carter [Tue, 29 Aug 2000 14:43:42 +0000 (14:43 +0000)]
added -P (for no prompt) and -A <authfile> options

jerry

23 years agoadded a #define for SPOOLSSGETPRINTERDATAEX. Although we do not
Gerald Carter [Tue, 29 Aug 2000 14:42:10 +0000 (14:42 +0000)]
added a #define for SPOOLSSGETPRINTERDATAEX.  Although we do not
support the RPC yte (win2k specific), I added it for documentation
purposes.

jerry

23 years agofixed previous bug spotted by Elrond in get_printerdrivernumber().
Gerald Carter [Tue, 29 Aug 2000 14:38:38 +0000 (14:38 +0000)]
fixed previous bug spotted by Elrond in get_printerdrivernumber().
Thought I had already committed this.

jerry

23 years agoadded -A <authfile> option to smbclient for the reading of username /
Gerald Carter [Tue, 29 Aug 2000 14:35:31 +0000 (14:35 +0000)]
added -A <authfile> option to smbclient for the reading of username /
password credentials from a file.

--jerry

23 years agoneeded to use strwicmp() in smbclient code, so I moved it to util_str.c
Gerald Carter [Tue, 29 Aug 2000 14:33:39 +0000 (14:33 +0000)]
needed to use strwicmp() in smbclient code, so I moved it to util_str.c
and made it non-static

--jerry

23 years agomake rpcclent by default.
Gerald Carter [Tue, 29 Aug 2000 14:32:23 +0000 (14:32 +0000)]
make rpcclent by default.

--jerry

23 years agoadded the -A <authfile> option for allowing the reading of user
Gerald Carter [Tue, 29 Aug 2000 14:31:27 +0000 (14:31 +0000)]
added the -A <authfile> option for allowing the reading of user
name and password credentials from a file.  Designed for use
when needed to passwd credentials between scripts

--jerry

23 years agofirst draft at rpcclient man page for HEAD branch. Taken heavily
Gerald Carter [Tue, 29 Aug 2000 14:29:53 +0000 (14:29 +0000)]
first draft at rpcclient man page for HEAD branch.  Taken heavily
from the man page in TNG.  Updated for newer spoolss commands.

jerry

23 years agoThis doesn't compile but is a placeholder for moving the UNIX
Jeremy Allison [Tue, 29 Aug 2000 00:29:15 +0000 (00:29 +0000)]
This doesn't compile but is a placeholder for moving the UNIX
acl code over to POSIX acls.
Jeremy.

23 years agosmbd/password.c: Fixed typo in Tim's new code that caused insure overrun error.
Jeremy Allison [Mon, 28 Aug 2000 20:45:00 +0000 (20:45 +0000)]
smbd/password.c: Fixed typo in Tim's new code that caused insure overrun error.
smbd/reply.c: Fixed lowercasing UNIX character set problem.
Jeremy.

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

23 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

23 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

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

23 years agoOops - missed a file.
Tim Potter [Mon, 28 Aug 2000 06:50:45 +0000 (06:50 +0000)]
Oops - missed a file.

23 years agoMerge from appliance branch.
Tim Potter [Mon, 28 Aug 2000 06:46:53 +0000 (06:46 +0000)]
Merge from appliance branch.

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

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

23 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!

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

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

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

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

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

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

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

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

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

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

23 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

23 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

23 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

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

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

23 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

23 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

23 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

23 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

23 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

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

jerry

23 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

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

23 years agoTidied up extra ()'s.
Jeremy Allison [Tue, 15 Aug 2000 02:33:27 +0000 (02:33 +0000)]
Tidied up extra ()'s.
Jeremy

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

23 years agoMerge.
Tim Potter [Mon, 14 Aug 2000 21:27:54 +0000 (21:27 +0000)]
Merge.

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

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

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

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

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

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

jerry

23 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

23 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

23 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

23 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

23 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

23 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

23 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

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

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

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

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

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

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

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

23 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

23 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

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

jerry

23 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

23 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

23 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

23 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