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

55 Commits

Author SHA1 Message Date
Andrew Bartlett
83db39d2b5 Fix this to use the plaintext password code directly, like SWAT does.
This whole area needs to be cleaned up.  Should this kind of passowrd
change/check be permitted with encrypt passwords = yes?

In any case I've also had trouble testing this, as I can't find the right
software/configuration to exersise this behaviour.  But its better than the
previous situation.  Any assistance greatly appriciated.

Andrew Bartlett
(This used to be commit 37655b4289)
2001-09-26 12:12:26 +00:00
Simo Sorce
61b2794968 move to SAFE_FREE()
(This used to be commit a95943fde0)
2001-09-17 11:25:41 +00:00
Andrew Tridgell
19fea3242c the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work
(This used to be commit dcd6e735f7)
2001-09-04 07:13:01 +00:00
Andrew Tridgell
2771d77c60 tidied up some unused vars in JFs new fns
(This used to be commit e26502b1f8)
2001-09-03 08:54:24 +00:00
Jean-François Micouleau
b03a2011bb Ouch ! I didn't think I would have to do that: add 2 new rap calls !
It's a quick and ugly hack as a proof of concept: the dell powervault 705
works with a samba PDC.

I'll do a correct user enumeration later.

	J.F.
(This used to be commit 9ec6a87356)
2001-08-28 16:05:55 +00:00
Simo Sorce
2e783a4707 this is a big global fix for the ptr = Realloc(ptr, size) bug.
many possible mem leaks, and segfaults fixed.

someone should port this fix to 2.2 also.
(This used to be commit fa8e55b8b4)
2001-08-12 17:30:01 +00:00
Tim Potter
4bbd1ddb27 More constant conversions.
(This used to be commit 00703d306f)
2001-08-10 05:50:47 +00:00
Gerald Carter
de5f42c9d9 merge from 2.2
(This used to be commit 6ab0e949d1)
2001-08-10 04:27:26 +00:00
Jeremy Allison
b026e6edf2 Added Gerald's lanman printing only change to HEAD.
Jeremy.
(This used to be commit b7bd512d9a)
2001-08-06 22:39:51 +00:00
Andrew Bartlett
5b8d230e39 This removes unused paramaters from various authtication functions, and should
not change behaviour.

This should make my later diffs smaller, where I actualy start cleaning up this
mess...

Andrew Bartlett
(This used to be commit 04f090c224)
2001-07-08 14:10:30 +00:00
Andrew Tridgell
527e824293 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
(This used to be commit c41fc06376)
2001-07-04 07:36:09 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00
Gerald Carter
30c4c04c2f Patch from Simo:
o sed 's/pdb_clear_sam/pdb_free_sam/g'
  o add pdb_reset_sam()
  o password changing should be ok now as well.
(This used to be commit 96d0e7c330)
2001-05-07 14:04:46 +00:00
Jean-François Micouleau
f35157f392 Big cleanup of passdb and backends.
I did some basic tests but I have probably broken something. Notably the
password changing. So don't cry ;-)

	J.F.
(This used to be commit a4a4c02b12)
2001-05-04 15:44:27 +00:00
Andrew Tridgell
d095b5249c - added test for vasprintf
- cleaned up GNUC printf attribute macros
- added enum handling in mkproto
- removed non-vararg code
- made slprintf and vslprintf just macros for snprintf and vsnprintf
- don't need slprintf code any more
(This used to be commit c7aeb2254d)
2001-04-28 13:49:34 +00:00
Andrew Tridgell
578a9fabfb started converting some of the only-ascii code to use srvstr_*
added srvstr_push_ascii() and srvstr_pull_ascii() as convenience
routines to replace the current usage of strncpy() like fns
for packet pull/push. We need to do this in *lots* of places
in Samba in order to get our codepage handling right
(This used to be commit 8b0e3679a6)
2001-03-31 13:48:24 +00:00
Jeremy Allison
a447217509 Two OS/2 printer fixes from Jim McDonough @ IBM.
First one adds a new info level into the lanman printing and an ioctl to the trans2 code.
    Andrew - this uses ASCII only. It looks ok to me but please check !
Second one adds a parameter "os2 driver map" that allows OS/2 driver names to be mapped.
Jeremy.
(This used to be commit da79b519e0)
2001-03-23 03:12:58 +00:00
Andrew Tridgell
1656c5d258 ADMIN$ is an IPC share, not a disk share
(This used to be commit 0ea62800ed)
2001-03-17 14:02:44 +00:00
Jeremy Allison
da3053048c Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR
RPC code to merge with new passdb code.
Currently rpcclient doesn't compile. I'm working on it...
Jeremy.
(This used to be commit 0be41d5158)
2001-03-11 00:32:10 +00:00
Jeremy Allison
ed77fca199 include/rpc_spoolss.h: Added JOB_STATUS_XXX defines.
include/smb.h: Added LPQ_xx enums to correspond with the NT JOB_STATUS_XXX. We
                need these to be different as we're storing LPQ_xx enums in the tdb
                already.
rpc_server/srv_spoolss_nt.c: Don't need to return status strings as we're now
                            returning status codes.
smbd/lanman.c: Change the RAP status codes to have "RAP" in the name.
printing/printing.c: Keep track of the status of a job. Allow a job to be
                deleted from one smbd when being submitted by another.
                Made logic in mutex clearer.
Jeremy.
(This used to be commit 71029da7dd)
2001-02-23 03:59:37 +00:00
David O'Neill
2506c61ab3 Changes from APPLIANCE_HEAD:
source/include/proto.h
        - make proto

    source/printing/nt_printing.c
    source/rpc_server/srv_spoolss_nt.c
        - Fix for the overwriting of printerdata entries when WinNT and
          Win2k are modifying printer parameters on PCL printers. Turns out
          that Win2k creates a printer with a NULL devmode entry and then
          expects to set it on *OPEN* (yes this is insane). So we cannot
          return a "default" devmode for a printer - and we must allow an
          open to set it.

    source/tdb/tdb.c
        - Show freelist in an easier format. Show total free.
        - When storing a new record, allocate memory for the key + data
          before the tdb_allocate() as if the malloc fails a (sparse) hole
          is left in the tdb.

    source/tdb/tdbtool.c
        - Show freelist in an easier format. Show total free.

    source/tdb/Makefile
        - cleaned up Makefile dependancies

    source/smbd/lanman.c
        -  Fix for Win9x corrupting it's own parameter string.

    source/printing/printfsp.c
    source/printing/printing.c
    source/rpc_server/srv_spoolss_nt.c
    source/smbd/close.c
        - Added normal close parameter into print_fsp_end() which treats an
          abnormal close as error condition and deletes the spool file.
(This used to be commit 025f7a092a)
2001-01-29 21:34:08 +00:00
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