1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

4284 Commits

Author SHA1 Message Date
Andrew Tridgell
9e1f9a5719 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 14e534a890)
2000-08-28 04:42:31 +00:00
Andrew Tridgell
4ff15c319e 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 f99f028c77)
2000-08-28 03:17:22 +00:00
Andrew Tridgell
bbc7918ad0 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 311a4dfb9a)
2000-08-28 02:06:25 +00:00
Jeremy Allison
ace6739f5e vfs write data fix. Fix for name matching in addtosmbpass
Jeremy.
(This used to be commit 85738b7ee1)
2000-08-25 20:44:33 +00:00
Tim Potter
c79b92bbd8 Replaced "\\MAILSLOT\\NET\\NETLOGON" with NET_LOGON_MAILSLOT constant.
(This used to be commit 5764e84c0e)
2000-08-25 04:18:50 +00:00
Andrew Tridgell
e1b9b33e2b - 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 2520a0eff9)
2000-08-25 03:58:02 +00:00
Tim Potter
ebe8a05062 Updated file with version in TNG.
(This used to be commit 156e17dea4)
2000-08-25 00:55:27 +00:00
Jeremy Allison
42e8f4102d Modified to use sid_to_uid and sid_to_gid. Now ready for POSIX ACL
code....
Jeremy.
(This used to be commit 28586c1dee)
2000-08-24 19:48:31 +00:00
Jeremy Allison
f03879e0b3 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 3514b5bb8f)
2000-08-23 23:05:49 +00:00
Jeremy Allison
b3addf7ebe Documentation on NT_USER_TOKEN. Requested by Sander.
Jeremy.
(This used to be commit e203324d4a)
2000-08-23 17:38:52 +00:00
Jeremy Allison
641d9e85ea Added code to do SID to uid/gid conversion. Needed for ACL support.
Jeremy.
(This used to be commit 81c5380f91)
2000-08-23 00:45:40 +00:00
Tim Potter
af0071c9b8 Patch from John Reilly <jreilly@hp.com> for not processing duplicate files
when moving printer driver to download area.
(This used to be commit 6e0c9079c3)
2000-08-22 06:28:33 +00:00
Jeremy Allison
d8ad8a0d74 Fix for safe_free freeing static strings. From Robert August Vincent, II.
Jeremy.
(This used to be commit bd844fcd30)
2000-08-21 19:30:19 +00:00
Luke Leighton
7e5fd8fc2c oops. must return "" string and length zero when strlen(filebuf) == 0
(This used to be commit d3bc7cca99)
2000-08-18 06:27:24 +00:00
Gerald Carter
0136927ed8 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 4fad1fc28a)
2000-08-18 06:03:13 +00:00
Gerald Carter
f77c277184 fixed initialization errors (again!) I must have forgot to
check these in before.




jerry
(This used to be commit e682d6a599)
2000-08-18 05:57:09 +00:00
Luke Leighton
40cc8e0df2 getfileline() - line with length of zero -> filebuf[strlen(filebuf)-1]
is NOT ok.
(This used to be commit 24e0c8ef70)
2000-08-18 05:56:19 +00:00
Gerald Carter
7c3ca833e6 changing some debug message levels
j-
(This used to be commit facef51be4)
2000-08-18 05:55:37 +00:00
Gerald Carter
150d8c6a87 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 ac049f8bf3)
2000-08-17 20:05:05 +00:00
Gerald Carter
82149af29f added comment for my own memory purposes
jerry
(This used to be commit b64ddbd1aa)
2000-08-17 20:03:53 +00:00
Gerald Carter
a9b2a40682 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 3b14487c7e)
2000-08-16 03:44:04 +00:00
Gerald Carter
4620c70549 - fixed memcpy bug in copy_unistr2()
- init_unistr2_from_unistr() does not NULL terminate
  the buffer



--jerry
(This used to be commit 65ee5f9b6e)
2000-08-16 03:41:02 +00:00
Gerald Carter
2ba82c02d4 fixed unitialized struct bug in enum_users (whatever it is called)
jerry
(This used to be commit a606131508)
2000-08-16 03:38:52 +00:00
Gerald Carter
a705af14be fixed typo.
jerry
(This used to be commit f00a330b3e)
2000-08-16 03:34:58 +00:00
Gerald Carter
02e3b4a802 fixed error in [public] spotted by Ron Alexander <rcalex@home.com>
changed to read only = yes



jerry
(This used to be commit e17753c532)
2000-08-15 23:36:05 +00:00
Tim Potter
aa3802ba0e Merge of uninitialised variable fix from APPLIANCE_HEAD.
(This used to be commit 20a7fefee8)
2000-08-15 21:09:54 +00:00
Jeremy Allison
0631c6e3a7 Tidied up extra ()'s.
Jeremy
(This used to be commit f94f37dcab)
2000-08-15 02:33:27 +00:00
Jeremy Allison
d8464d49c6 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 be4e5eeb4f)
2000-08-14 23:48:07 +00:00
Tim Potter
3628c65e3c Merge.
(This used to be commit 604f6a34ef)
2000-08-14 21:27:54 +00:00
Gerald Carter
7ed3fcad2a 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 bd4c83eb40)
2000-08-14 21:18:02 +00:00
Tim Potter
b5f75af6f9 NT printer permissions test program.
(This used to be commit 9af82423d2)
2000-08-14 18:39:51 +00:00
Luke Leighton
83424f676e restored IS_BITS_SET_xxx macros.
(This used to be commit bc065f9597)
2000-08-14 11:03:30 +00:00
Luke Leighton
d2d074580d 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 8fe195df0b)
2000-08-14 07:37:12 +00:00
Luke Leighton
becf055e78 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 b2e044f89d)
2000-08-14 07:33:34 +00:00
Gerald Carter
a19339b3ac minor formatting fixes.
jerry
(This used to be commit 95355d2cf2)
2000-08-14 03:18:17 +00:00
Gerald Carter
e2bb0779af 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 bc154e8522)
2000-08-14 03:17:17 +00:00
Gerald Carter
13913e2c97 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 236f19659c)
2000-08-12 14:51:36 +00:00
Gerald Carter
2ca88a0f2d fixes to prs_unistr UNMARSHALLING only. Problem was due to talloc's
of 0 bytes.



jerry
(This used to be commit 3fcc59ba92)
2000-08-12 14:31:29 +00:00
Gerald Carter
74f2fc40db FIxed some unmarshalling problems with relstr and unistr arrays
jerry
(This used to be commit ce2d20395a)
2000-08-12 14:26:01 +00:00
Gerald Carter
cf023a7ce0 fixed unistr_to_ascii to deal with NULL src strings
jerry
(This used to be commit 8e95aae170)
2000-08-12 14:20:40 +00:00
Gerald Carter
95496b974a 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 233b9cffa2)
2000-08-12 14:14:40 +00:00
Gerald Carter
50cef4fa0d removed (void) typecast from SMB_ASSERT
jerry
(This used to be commit f806881e6c)
2000-08-12 14:10:27 +00:00
John Terpstra
69fc6695c5 Updated by Patrick Powell <papowell@lprng.org>
(This used to be commit 3361c144f5)
2000-08-12 02:41:42 +00:00
Jeremy Allison
f6795780eb 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 ceba9f3dcd)
2000-08-11 23:13:09 +00:00
Christopher R. Hertel
726e7e256e 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 40ae638866)
2000-08-11 22:29:44 +00:00
Jeremy Allison
295d684f53 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 cfbf78085d)
2000-08-11 00:53:13 +00:00
Jeremy Allison
137b7f873a Added "add_printer_hook" call to update printer for Win9x clients.
Patch from John Reilly <jreilly@hp.com>.
Jeremy.
(This used to be commit 76a5713bd3)
2000-08-10 23:41:16 +00:00
Jeremy Allison
1e823bc781 Tidied up security rights definitions.
Jeremy.
(This used to be commit e466c863f5)
2000-08-10 19:51:45 +00:00
Jeremy Allison
1e46bde597 Removed requirement that sid have an owner before being interpreted.
Thanks to Elrond for pointing this out.
Jeremy.
(This used to be commit 1d9a5494f8)
2000-08-10 17:48:15 +00:00
Gerald Carter
536a055a9a Working on spoolss_getprinterdriver() as it does not display all the
dependentfiles.



jery
(This used to be commit 206565368b)
2000-08-10 14:05:19 +00:00