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

284 Commits

Author SHA1 Message Date
Jeremy Allison
918c3ebe32 smbd/lanman.c: Fix for calling qsort with 0 number.
smbd/nttrans.c: Realloc mem fixes based on those that went into trans2.c
smbd/process.c: Move to a table based dispatch, based on a comment from Andrew
				about Antons work.
Jeremy.
(This used to be commit a958f7822e)
2001-01-24 19:04:56 +00:00
Jeremy Allison
2f7c1db093 include/vfs.h:
smbd/vfs-wrap.c:
smbd/vfs.c: Added fchmod_acl and chmod_acl.
lib/substitute.c:
smbd/lanman.c:
smbd/open.c:
smbd/process.c:
smbd/reply.c:
smbd/service.c: Removed sessetup_user variable. Added current_user_info struct
which conatins domain info etc. Added '%D' for client domain parameter.
Jeremy.
(This used to be commit 2844ec3d51)
2001-01-23 01:52:30 +00:00
David O'Neill
7599c82cce Changes from APPLIANCE_HEAD:
source/smbd/lanman.c
        - cleanup and bug fix for win9x print queue purge.

    source/printing/printing.c
        - cleanup and bug fix for win9x print queue purge.
        - print_job_end() changed to cleanup spool file in the event of a
          failure returned from the print_run_command()
(This used to be commit 0235fbef37)
2001-01-22 16:59:24 +00:00
David O'Neill
8aec70075a Changes from APPLIANCE_HEAD:
source/smbd/lanman.c
        - Change fill_printq_info() to fix corrupted 9X/ME printer comment
(This used to be commit acbed88a19)
2001-01-17 19:16:05 +00:00
Jeremy Allison
be7e02f9bc Fixed bug with Win9x/ME where drivername was being returned incorrectly in
one printq case. Now goes though common function.
Jeremy.
(This used to be commit e9f48c9cec)
2000-12-07 21:55:10 +00:00
Jeremy Allison
cf5b71994d file_lines_load/file_lines_pload can now optionally convert unix_to_dos()
on read.
Jeremy.
(This used to be commit 76b8dd376d)
2000-12-07 19:26:04 +00:00
Jeremy Allison
2130ced345 Fix for off-by-one StrnCpy.
Jeremy.
(This used to be commit 63cafb34b3)
2000-11-21 02:38:22 +00:00
Jeremy Allison
9df3d64a2c Fix from Jim McDonough @ IBM for OS/2 clients.
Jeremy.
(This used to be commit f571e1efd0)
2000-11-16 19:08:55 +00:00
Gerald Carter
9fede0dc0d 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
(This used to be commit 0b92d0838e)
2000-11-13 23:03:34 +00:00
Tim Potter
e1cc6c85d7 More merging of printing stuff from appliance.
(This used to be commit 18fa724a79)
2000-11-08 00:16:38 +00:00
Jeremy Allison
ff6f0c1a3b Call standard_sub_advanced() after lp_logon_XX() calls.
Jeremy.
(This used to be commit d5be2334d4)
2000-10-30 19:35:43 +00:00
Tim Potter
ecd90a0bf4 Renamed WPrintQueuePurge to WPrintQueueCtrl as this function can purge, pause
or resume a print queue.
(This used to be commit 9998518a69)
2000-10-18 06:22:20 +00:00
Tim Potter
08657e539e global_myname is actually a pstring.
(This used to be commit e451fd3461)
2000-10-06 04:36:05 +00:00
David O'Neill
a3a28675fa 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
(This used to be commit 74af3e2cae)
2000-09-01 18:49:26 +00:00
Andrew Tridgell
288ea15a56 make sure a couple of variables are initialised
(This used to be commit 155c7c3739)
2000-08-31 07:11:59 +00:00
Jeremy Allison
d407579b94 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.
(This used to be commit 6d081a9017)
2000-08-30 00:45:59 +00:00
Gerald Carter
92d1e90d49 fixed previous bug spotted by Elrond in get_printerdrivernumber().
Thought I had already committed this.





jerry
(This used to be commit 2ceb704c3d)
2000-08-29 14:38:38 +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
Jeremy Allison
d95777ac34 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 8cfb55e81a)
2000-08-01 00:41:19 +00:00
Jeremy Allison
49fcb300de 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 902ada6379)
2000-07-31 20:41:51 +00:00
Jeremy Allison
bc22ae0b47 Fixed up error checking and move printer file code. Fixed a memory leak.
Jeremy.
(This used to be commit 5130dd0f8b)
2000-07-25 22:35:57 +00:00
Jeremy Allison
9f040cc17e Modified the patch to look in the tdb *first* - thus allowing legacy text
filed to be ignored when an upload is done.
Modified to code to goto err on problems, simplifies it.
Jeremy.
(This used to be commit 9157a6ab26)
2000-07-19 23:47:10 +00:00
Jeremy Allison
5c162bbe5b Code from John Reilly <jreilly@hp.com> to add tdb lookups into the Win95
printer driver download if looking for the default driver files fail.
Jeremy.
(This used to be commit 1192d867c4)
2000-07-19 20:11:11 +00:00
Tim Potter
78a4848e8d Re-instated lanman printing security checks (oops).
A user can now pause, resume or delete their own job even if they don't
have the Manage Documents privilege.

Added call to se_access_check() for changing printer properties.  The Full
Access privilege is required for the user to perform this.

Several uninitialised variables and memory leaks plugged.

Modified default ACL created on new printers to be Everyone / Print instead
of Everyone / Full Access.  This required some random stuffing around with
the value of the revision field to correspond with the ACL that NT produces
when setting the same permission on the printer.

Fixed dodgy function call in printing/printfsp.c
(This used to be commit 2abce4dcfa)
2000-07-10 05:08:21 +00:00
Tim Potter
75dd5b5051 Don't check NT permissions when printing from lanman.
(This used to be commit e84607eedf)
2000-07-06 07:10:32 +00:00
Tim Potter
5824ae2734 Pass the vuid from the connection_struct to the printing back end functions.
(This used to be commit 6120d03200)
2000-06-16 08:18:57 +00:00
Jeremy Allison
a62d17dc61 Change from "David S. Chappell" <David.Chappell@mail.cc.trincoll.edu>
to make "printer driver file" a share parameter. This fits better with
the new NT printing subsystem.
Jeremy.
(This used to be commit 7afb68461f)
2000-06-08 22:24:13 +00:00
Jeremy Allison
0164047afb Fixing get/set of security descriptors.
Removed ugly hack for NT printing.
Fixed up tdb parse stuff memory leaks.
Jeremy.
(This used to be commit 8ef41f31c5)
2000-06-07 01:49:23 +00:00
Andrew Tridgell
49a0e6d598 more merging voodoo
this adds "#define OLD_NTDOMAIN 1" in lots of places. Don't panic -
this isn't permanent, it should go after another few merge steps have
been done
(This used to be commit 92109d7b3c)
2000-05-10 10:41:59 +00:00
Andrew Tridgell
f3a861e04e - use full_name instead of real_name
- got rid of guest map code in lpq parser
(This used to be commit 8e53f781d3)
2000-05-04 07:59:34 +00:00
Andrew Tridgell
32d5416b6a split the username in the vuser structure into a separate
userdom_struct. As the name implies this also contains a domain
(unused at the moment).

This will be important shortly, as operation in appliance mode needs
the domain to be always carried with the username.
(This used to be commit ee8546342d)
2000-05-02 13:55:42 +00:00
Andrew Tridgell
00e3fe1324 moved trans2.h and nterr.h into includes.h with all our other includes
(This used to be commit d7cd7c88fd)
2000-04-25 14:06:57 +00:00
Andrew Tridgell
d384e1801d fixed uninitialised snum
(This used to be commit 14251aab2e)
2000-04-22 08:27:48 +00:00
Andrew Tridgell
59f992f12d patch from luke to split out lanman code from ipc.c into lanman.c
(This used to be commit 95246a8432)
2000-04-19 07:00:22 +00:00