1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-15 05:57:49 +03:00

322 Commits

Author SHA1 Message Date
David O'Neill
c533e77f19 Changes from APPLIANCE_HEAD:
- trivial typo in definition of enum_printing[]
	  (source/param/loadparm.c)
	- fixed printer status display bug.  When no jobs existed in queue, the
	  clients were not properly notified of printer status.  This caused
	  native tools for pausing/unpausing a print queue to not work.
	  (source/printing/printing.c)
-
Jeremy Allison
f4c7f9ddb9 Added proto definition for new RPC calls.
Added printing fix from appliance-head.
Jeremy.
-
Jeremy Allison
a19f936b64 Adding in debug for SD's.
Jeremy.
-
Jeremy Allison
76b8dd376d file_lines_load/file_lines_pload can now optionally convert unix_to_dos()
on read.
Jeremy.
-
Jeremy Allison
fe730614d7 Sync-up with appliance-head printing code.
Jeremy.
-
Andrew Tridgell
8b3c1f4455 c++ style comments are NOT allowed -
Andrew Tridgell
9ec4b1fa48 no longer pass the type to make_sec_desc(), instead the type is
derived from the other arguments
-
Jeremy Allison
8f3332a9ac passdb/secrets.c passdb/smbpassfile.c smbd/server.c : Actually *use* the code
written to transition from an old DOMAIN.MACHINE.MAC file to secrets.tdb.
printing/nt_printing.c: Fix case insensitive name lookups for driver files.
John - this should fix the Win9x/WinME problem correctly.
Jeremy.
-
Jeremy Allison
78a1307445 Fix for updating of print queues changed from a local box. Essentially,
this makes sure that the change messages sent to ourselves are handled
synchronously w.r.t. other smb packets incoming.
Jeremy.
-
Jeremy Allison
eeab4e0290 Fix for memory leak when adding driver.
Jeremy.
-
Jeremy Allison
365c76e39d Fix for incorrect break using wrong offset when updating a form.
Jeremy.
-
Jeremy Allison
3aa7995660 Fix for a problem with the new messaging system. If a sender is using the
messaging system as a notification mechanism, and the speed of notification
greatly exceeds the speed of message recovery, then you get a massively (>75Mb)
growing tdb. If the message is a simple notification, then the message is
static, and you only need one of them in transit to a target process at
any one time.
This patch adds a BOOL "allow_duplicates" to the message_send_XX primitives.
If set to False, then before sending a message the sender checks the existing
message queue for a target pid for a duplicate of this message, and doesn't
add to it if one already exists.
Also added code into msgtest.c to test this.
Jeremy.
-
Jeremy Allison
b2b59b93ff Uninitialized memory read fixes.
open_file_shared takes a DOS pathname, not a UNIX one.
Jeremy.
-
Jeremy Allison
d43405bc47 Tuyrn debug timestamps on by default.
Add Tim's lpq race fix.
Jeremy.
-
Jeremy Allison
cdbd2e9977 Merge from appliance head of JR's changes for driver versioning.
Jeremy.
-
David O'Neill
fbcf83140d Changes from APPLIANCE_HEAD:
- merged Tim's vlp (virtual lp) test program.  Enable it with
      -DDEVELOPER or by using ./configure.developer
	  (source/include/smb.h source/configure.developer
	   source/printing/lpq_parse.c source/param/loadparm.c
	   testsuite/printing/.cvsignore testsuite/printing/Makefile.vlp
	   testsuite/printing/vlp.c)
-
Jeremy Allison
06e71c9f8b printing/nt_printing.c: After long soul searching and making both Andrew and my
life a misery, here is the only possible null driver fix we have found.
		This *SUCKS*.
rpc_server/srv_spoolss_nt.c: Correct printername search. Correct portname reply
						Correct attributes reply. Removal of unused temp variable.
Jeremy.
-
Gerald Carter
0b92d0838e Large commit which restructures the local password storage API.
Currently the only backend which works is smbpasswd (tdb, LDAP, and NIS+)
are broken, but they were somewhat broken before. :)

The following functions implement the storage manipulation interface

/*The following definitions come from  passdb/pdb_smbpasswd.c  */

BOOL pdb_setsampwent (BOOL update);
void pdb_endsampwent (void);
SAM_ACCOUNT* pdb_getsampwent (void);
SAM_ACCOUNT* pdb_getsampwnam (char *username);
SAM_ACCOUNT* pdb_getsampwuid (uid_t uid);
SAM_ACCOUNT* pdb_getsampwrid (uint32 rid);
BOOL pdb_add_sam_account (SAM_ACCOUNT *sampass);
BOOL pdb_update_sam_account (SAM_ACCOUNT *sampass, BOOL override);
BOOL pdb_delete_sam_account (char* username);

There is also a host of pdb_set..() and pdb_get..() functions for
manipulating SAM_ACCOUNT struct members.  Note that the struct
passdb_ops {} has gone away.  Also notice that struct smb_passwd
(formally in smb.h) has been moved to passdb/pdb_smbpasswd.c
and is not accessed outisde of static internal functions in this
file.  All local password searches should make use of the the SAM_ACCOUNT
struct and the previously mentioned functions.

I'll write some documentation for this later.  The next step is to fix
the TDB passdb backend, then work on spliting the backends out into
share libraries, and finally get the LDAP backend going.

What works and may not:

	o domain logons from Win9x 	works
	o domain logons from WinNT 4	works
	o user and group enumeration
		as implemented by Tim	works
	o file and print access		works
	o changing password from
		Win9x & NT		ummm...i'll fix this tonight :)

If I broke anything else, just yell and I'll fix it.  I think it
should be fairly quite.





-- jerry
-
Jeremy Allison
f25b5798b8 Added Tim's changes to lock DB during update.
Jeremy.
-
Jeremy Allison
b17e23a8ff printing/nt_printing.c: use getpwuid not smbgetpwuid. Canonicalize printernames.
printing/printing.c: Insure fix for malloc of zero.
rpc_parse/parse_misc.c: Enusre UNISTR's are zero filled.
rpc_parse/parse_spoolss.c: Correct INFO_6 - differs between pre-releases of W2K and shipping build.
rpc_server/srv_spoolss_nt.c: Canonicalize printernames.
Jeremy.
-
Andrew Tridgell
c4bb9c598c an attempt to get the handling of fields in printer info structures
consistent. Still working with Jeremy on this, there is probably more
to be done
-
Tim Potter
8fe17fd594 Merge of latest round of printing fixes from appliance branch. -
Tim Potter
ae087bdf31 Merge of printer security descriptor, info level and printerdata
comparison changes from appliance branch.
-
Jeremy Allison
a33c395c98 Merge from Tim - don't reinsert UNIX job if already exists.
Jeremy.
-
Tim Potter
8e163eac33 Merge of printing improvements/fixes from appliance branch. -
Jeremy Allison
6b94273fc6 Sync up with Tim's changes in applience-head for SACLs.
Jeremy.
-
Jeremy Allison
f81a2a03bf Added John Reillys patch for error code returns from clean_up_printer_driver_strunct()
calls.
Jeremy.
-
Jeremy Allison
521f09829f Sorry JF - no billable hours :-). I fixed the "stream of events" problem
with PCL drivers. The problem was we were updating the changeid on every
SETPRINTERDATA/DELETEPRINTERDATA call. We should not do this, we should
just update the 'setprinter' called count. We update the changeid on calls
to SETPRINTER/ADDPRINTER/ADDPRINTEREX etc. Also fixed the correct returning
of the create time on printers.
Jeremy.
-
Jeremy Allison
c3e4ac9a2d We already have a perfectly good next_token() function we should be using
instead of strtok - this fixes a bug with NT users with spaces in their
names when using winbindd. Needs to be added to the other parse_lpXX functions
(currently only added to lprng parsing code).
Jeremy.
-
Jeremy Allison
fd17374e6d John Reilly @ HP (who is a wonderful human being and *definately* needs
CVS commit access :-) has written a simple routine that peeks inside the
MS PE printer driver file format and can tell if a driver is W2K or NT4.x.
So we can now correctly return the driver version number. Hurrah !
JF - this is the code you always wanted ..... :-) :-).
Jeremy.
-
Tim Potter
e40a0e2f52 Removed null user checks to enable lanman print queue pausing and print job
deleting.
-
Jeremy Allison
13395514c6 Fix for growing printing.tdb by adding check on job creation.
This also updates the printing.tdb db version to 2.
Jeremy.
-
Jeremy Allison
e85a0fadd8 Remove lpq as root fix - do this in print_job_start instead
as part of print queue length processing.
Jeremy.
-
Jeremy Allison
6581066b93 Fixes to periodically scan printing.tdb in idle time and occasionally
on exit. Needed to fix printing.tdb from groving to 300Mb+ if being
driven by smbclient clients that never ask for status... (effective
DOS attack :-).
Jeremy.
-
Jeremy Allison
5518f59976 Fixed Realloc memory fragmentation problems.
Jeremy.
-
Andrew Tridgell
6e4a358552 got rid of tdb_writelock() and instead lock a chain. tdb_writelock()
is conceptually flawed
-
Jeremy Allison
d9eedd5db1 Integrated support for NT and OS/2 lpq parsing. Code from
Jim McDonough
Infoprint Manager Development
Linux Technology Center
IBM Boulder

Jeremy.
-
Jeremy Allison
b07611f815 Restructuring of vfs layer to include a "this" pointer - can be an fsp or
a conn struct depending on the call.
We need this to have a clean NT ACL call interface.
This will break any existing VFS libraries (that's why this is pre-release
code).
Andrew gets credit for this one :-) :-).

In addition - added Herb's WITH_PROFILE changes - Herb - please examine
the changes I've made to the smbd/reply.c code you added. The original
code was very ugly and I have replaced it with a
START_PROFILE(x)/END_PROFILE(x) pair using the preprocessor.
Please check this compiles ok with the --with-profile switch.
Jeremy.
-
Jeremy Allison
dd9f668108 utils/smbcontrol.c: Fixes from Herb for interactive use.
printing/nt_printing.c: No C++ comments please :-).
Jeremy.
-
Jeremy Allison
837839eb3d Fix from John Reilly for forms ordering problems.
Jeremy.
-
Herb Lewis
eecee22bf1 fix for IRIX 6.2 compiler error -
Jeremy Allison
e5d98ba9e9 Move towards getting W2k p&p to upload NT4.x drivers. Still doesn't work -
not sure why (JF - a glance at this would be appreciated). Removed code
that JF objected to with enumprinterdata. Added translations to/from
level 6 - but Win2k still not happy... hmmm...
Jeremy.
-
Jeremy Allison
29f41d0d95 Ensure old DACL and SACL are preserved if the new SD is a 'set' only.
Jeremy.
-
Tim Potter
a15e610bb3 When creating a print job entry for the printing backend, use the Windows
username rather than the Unix username.  The Windows username will then be
shown in the port monitor regardless of the Unix username used to spool the
job.
-
Jeremy Allison
0249de4cd9 Added time check test before allowing print job.
Jeremy.
-
Tim Potter
318ead783c Added missing break statement for manage documents check in
print_access_check() function.
-
Jeremy Allison
e08b521559 Fixed memory leaks found in enumprinterdrivers code.
Jeremy.
-
Jeremy Allison
54cab7dd3b 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.
-
Jeremy Allison
1c9ac94c94 Temporary fix to convert from level6 (Win2k) to level 3 (NT4)
for driver download files.
Jeremy.
-
David O'Neill
74af3e2cae 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
-