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

4095 Commits

Author SHA1 Message Date
David O'Neill
fcfaebda7f Changes from APPLIANCE_HEAD:
source/smbd/server.c
    source/nmbd/nmbd.c
        - Fixed a very subtle bug with signals. Seems that POSIX requires
          that the signal mask be inhereted. So, if you happen to kick off
          smbd/nmbd from code that has the mask set on SIGUSR1, you lose
          messages.
(This used to be commit b4c98196fc)
2001-01-25 16:36:42 +00:00
Richard Sharpe
4f7b2b7083 Remove an inet_aton so that this code will compile on Solaris ...
Ahhh, the sweet smell of portability.
(This used to be commit 09902d2d4a)
2001-01-25 13:47:13 +00:00
Anton Blanchard
c15a054b21 io_bufsize was set too large and so full length reads
and writes got broken up into one ~64k and one ~1k packet.
(This used to be commit b91f906467)
2001-01-25 06:40:44 +00:00
Jeremy Allison
5aef8a21c6 Fixes from appliance-head for pdc searches.
Jeremy.
(This used to be commit d04ed97eca)
2001-01-25 02:59:13 +00:00
Jeremy Allison
cf90dbd158 Fixed "object picker can't determine if object in domain" bug seen from W2K
clients. Did this by importing Samba-TNG code that correctly handles LSA
lookups.
*MANY* thanks to Luke, Sander, Elrond and the rest of the TNG gang !
Jeremy
(This used to be commit f76dc952f7)
2001-01-25 02:35:50 +00:00
Jeremy Allison
16dd4b9988 Fix insure problems with passwd caching code.
Jeremy.
(This used to be commit 2bd4f16389)
2001-01-24 22:31:43 +00:00
Jeremy Allison
b15e9adea1 Sync up with POSIX ACL code from 2.2.
Jeremy.
(This used to be commit e0431672cc)
2001-01-24 21:54:44 +00:00
Jeremy Allison
2be2a3d62c Added modification to Richard Bollinger getpw[nam|uid] cache patch. Only
uses cache max 100 times.
Jeremy.
(This used to be commit 3712e35c54)
2001-01-24 21:46:16 +00:00
Jeremy Allison
24f8e973b2 smbd/process.c: & type with 0xff for paranioa sake...
smbd/reply.c smbd/service.c: cause all "add home service" calls to go through a
winbindd aware function.
Jeremy.
(This used to be commit a72d12e992)
2001-01-24 19:34:53 +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
David O'Neill
e31bf05363 Changes from APPLIANCE_HEAD:
source/printing/printing.c
        - When deleting a job, remove the entry from the back-end database
          if the delete succeeded.  This stops a spurious permission denied
          message appearing if the forced database update is within the lpq
          cache timeout and doesn't actually delete the job from the
          database.
(This used to be commit be61c98832)
2001-01-24 16:46:08 +00:00
Gerald Carter
b1be311add getpw[nam|uid] caching patch from "Richard Bollinger"
<rabollinger@home.com>



jerry
(This used to be commit 158430ba6a)
2001-01-24 15:47:31 +00:00
Gerald Carter
ba3ee7fdaa fixed typo in debug statement
jerry
(This used to be commit a28d384e4d)
2001-01-24 15:41:07 +00:00
Richard Sharpe
d53f9716bb Fix a problem with smbc_unlink on directories where it was returning EACCES
instead of EPERM and a problem with SMBC_OPEN where it ignored an error
from the underlying cli_open routine and cheerfully returned a bogus FD.
(This used to be commit 68614bac5a)
2001-01-24 12:32:20 +00:00
Jeremy Allison
327e2b3029 Fix from Kenichi Okuyama for memory leak on Realloc fail.
Jeremy.
(This used to be commit 6e56833225)
2001-01-23 22:21:46 +00:00
Gerald Carter
05cbf30452 increase MAX_POL_HNDS (merge from 2.2)
--jerry
(This used to be commit a946d13e0c)
2001-01-23 22:14:33 +00:00
Gerald Carter
42571a656f only add the service name and client machine name to list of users names
for a session when in share mode security


--jerry
(This used to be commit 22d6c2c163)
2001-01-23 22:13:41 +00:00
David O'Neill
eee29958f5 Changes from APPLIANCE_HEAD:
source/rpc_server/srv_spoolss_nt.c
        - add an access check to _spoolss_deleteprinter() to stop random
          users and passers by from deleting printers.

    source/lib/messages.c
        - converted global msg_all struct to a local in message_send_all()
          function.

    source/include/smb.h
        - added a success error code to the spoolss return codes.

    source/include/proto.h
    source/param/loadparm.c
    source/printing/printing.c
        - Added new parameter "total print jobs" to limit the total number
          of print jobs across all queues. Currently individual queues are
          limited by "max print jobs".
(This used to be commit 02f154e729)
2001-01-23 20:25:25 +00:00
David O'Neill
b9c5be4d79 Changes from APPLIANCE_HEAD:
source/rpc_server/srv_spoolss_nt.c
        - remove redundant srv_spoolss_sendnotify() calls from
          _spoolss_startdocprinter() and _spoolss_enddocprinter(), as its
          functionality is already covered in print_job_start() and
          print_job_end()

    source/printing/printing.c
        - force a print_queue_update() prior to print queue purge so that
          all jobs are purged.
(This used to be commit 0ccc552203)
2001-01-23 17:39:03 +00:00
Tim Potter
a699e9b572 Some systems don't support SEC_RIGHTS_MAXIMUM_ALLOWED for lsa_open_policy()
but NT sends 0x2000000 so we might as well do it too.
(This used to be commit 394e17645b)
2001-01-23 17:33:35 +00:00
Tim Potter
be09d25902 Patch to get smbcacls and rpcclient to compile together.
(This used to be commit 5a9870f22d)
2001-01-23 17:32:47 +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
3ea544fecb Changes from APPLIANCE_HEAD:
source/printing/printing.c
		- remove unused variable
(This used to be commit 2d09b53b3a)
2001-01-22 19:46:22 +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
3d153ef9fb Small bugfix from Kenichi Okuyama <okuyamak@dd.iij4u.or.jp>:
-FN_GLOBAL_INTEGER(lp_min_wins_ttl, &Globals.max_wins_ttl)
+FN_GLOBAL_INTEGER(lp_min_wins_ttl, &Globals.min_wins_ttl)
(This used to be commit 0233ba4426)
2001-01-22 15:30:38 +00:00
David O'Neill
c4e0cb72bc Changes from APPLIANCE_HEAD:
source/include/proto.h
		- make proto

	source/rpc_server/srv_spoolss_nt.c
		- clean up incorrect debug statement
(This used to be commit f07f4e9c7b)
2001-01-19 16:58:23 +00:00
David O'Neill
a5b27e9cea Changes from APPLIANCE_HEAD:
source/printing/nt_printing.c
        - use se_create_child_secdesc() to create appropriate security
          descriptor when performing print job admin security checks.

    source/printing/printing.c
        - Use JOB_ACCESS_ADMINISTER instead of PRINTER_ACCESS_ADMINISTER in
          print_job_{delete,pause,resume}()
        - If stat'ing the job file fails, delete the job from printing.tdb
        - In print_job_end() check lpq cache time and do a
          print_queue_update() This prevents printing.tdb from growing when
          using NT/2K clients, and there isn't someone pressing F5 in a
          port monitor window.
        - In print_queue_resume() check lpq cache time and do a
          print_queue_update() Probably should do it for print_job_resume()
          too.
(This used to be commit 0068b7741f)
2001-01-19 16:57:39 +00:00
David O'Neill
a4c22506ef Changes from APPLIANCE_HEAD:
source/lib/util_seaccess.c
        - added se_create_child_secdesc() function  which takes a parent
          (container) security descriptor and creates a security descriptor
          which has the inheritance flags for each ACE applied.  In NT a
          print job is a child object of a printer so deleting and
          pausing/resuming jobs requires a check against the child security
          descriptor, not the parent.  The values seen in NT printer
          security descriptors now all fit together in a natural and
          elegant way which is always nice.
        - Removed #ifdef'ed out portion of check_ace() when the
          INHERIT_ONLY flag is set as the se_create_child_secdesc()
          function now creates a security descriptor which can be used
          without this hack.
(This used to be commit f125b9a944)
2001-01-19 16:56:58 +00:00
David O'Neill
1a0d64a425 Changes from APPLIANCE_HEAD:
source/rpc_server/srv_spoolss_nt.c
        - Fixed dereference of NULL pointer in security descriptor
          notification used by Win2K printers.
(This used to be commit 1b6efd1894)
2001-01-18 16:13:03 +00:00
Jeremy Allison
ebee2c6c6d Get the logic right thistime :-(.
Jeremy.
(This used to be commit 83596034cd)
2001-01-17 23:47:08 +00:00
Jeremy Allison
aa7cd80206 Typo in new file_chmod code caused file attribute changes to fail.
THIS NEEDS TO BE ADDED TO APPLIANCE-HEAD.
Jeremy.
(This used to be commit b92ccc0c8e)
2001-01-17 23:41:01 +00:00
David O'Neill
22363b9d78 Changes from APPLIANCE_HEAD:
source/include/proto.h
    source/include/rpc_spoolss.h
    source/rpc_parse/parse_spoolss.c
    source/rpc_server/srv_spoolss.c
    source/rpc_server/srv_spoolss_nt.c
        - speedups in printer queue enumeration  - still room for
          improvement.  The construct_dev_mode() still creates and destroys
          a printer info_2 structure every time it is called.
        - fixed job->devmode memory leak
        - converted printer job notification routines to use tallocated
          memory rather than a fixed 2K buffer.   This reduces the memory
          requirements of a 4500 job queue enumeration from 90MB to about
          16MB.
(This used to be commit 7853b27bc1)
2001-01-17 22:55:02 +00:00
David O'Neill
0407ba8b1b Cleanup of Get_Pwnam(). Adds debugging, cleans up the allow_change
codepath.
(This used to be commit 767f73aee6)
2001-01-17 22:33:07 +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
David O'Neill
792ca5d989 Changes from APPLIANCE_HEAD:
source/rpc_server/srv_spoolss_nt.c
        - Unrolled construct_notify_jobs_info() loop to only fetch
          printer info_2 structure once rather than num_print_jobs times.
        - convert command to unix codepage.
        - remove lp_remove_service() call as it prevents lp_killservice()
          from working.
        - Modified some DEBUG and DEBUGADD statements.

    source/param/loadparm.c
    source/param/params.c
        - change printer, preload, auto services to FLAG_DOS_STRING,
          reverted earlier changes to szPrintername et al, add comments.

    source/printing/load.c
        - fix bug with lp_auto_services() and strtok()

    source/printing/nt_printing.c
    source/printing/printing.c
        - remove redundant test that used SERVICE(snum)

    source/printing/pcap.c
        - add unix_to_dos() calls, add notes wrt FIXMEs for
          xxx_printer_fn() functions.

    source/web/swat.c
        - added FIXME comment.

    source/smbd/service.c
        - added comment re: dos codepage
(This used to be commit 7b774b72c2)
2001-01-17 18:47:46 +00:00
Tim Potter
73ba07b362 Set the tdb->map_ptr to NULL if mmap() returns -1.
(This used to be commit cef7f58ac5)
2001-01-16 18:33:05 +00:00
David O'Neill
b85d1ecc26 Changes from APPLIANCE_HEAD:
source/param/loadparm.c
        - changed lp_add_printer() to convert szPrintername and comment
          from unix to DOS codepage.
(This used to be commit 6a1f55b325)
2001-01-16 18:17:55 +00:00
Tim Potter
b3ccabeece Fix for no master browser present.
(This used to be commit 24c78fdf5f)
2001-01-16 17:48:39 +00:00
Tim Potter
4673a99187 Some ugly mucking around to get the new rpcclient compiling and linking
with the new samr code and have prototypes working and smbd linking.
(This used to be commit 6d61f11788)
2001-01-15 23:53:33 +00:00
Tim Potter
31f42d9fab New proto and some small changes to rpc_samr.h
(This used to be commit 7f31d4ab1d)
2001-01-15 23:39:20 +00:00
Tim Potter
19a8acda64 rpcclient functions for remaining samr and lsa functions. All functions
now pass through insure except for some of the dodgy spoolss prs
weirdness.
(This used to be commit 76f08426a0)
2001-01-15 23:35:59 +00:00
Tim Potter
5a0e2f1957 Added remaining samr functions needed by winbindd.
Added #define/#undef NEW_NTDOMAIN symbols.
(This used to be commit 13e4fd1d84)
2001-01-15 23:34:32 +00:00
Jeremy Allison
7786e07735 Fixes for POSIX ACLS. ACL merge code.
Jeremy.
(This used to be commit 180e4a9cd0)
2001-01-15 22:46:22 +00:00
Jeremy Allison
e870dd2988 Updated from 2.2.
Jeremy.
(This used to be commit 6fb5eb8b1e)
2001-01-15 19:02:57 +00:00
David O'Neill
27922c0430 Changes from APPLIANCE_HEAD:
source/rpc_parse/parse_lsa.c
        - off by one unistr length bug in init_lsa_trans_name()

    source/lib/util_sid.c
        - resolve more BUILTIN sid values to names.

    source/nsswitch/wb_client.c
        - fix typo in debug message
        - set errno on error so we don't get bogus value from last failure.

    source/rpc_server/srv_spoolss_nt.c
        - add debug to track number of open printer handles for ease of
          tracking handle leaks in the future.

    source/rpc_server/srv_lsa.c
        - fix off-by-one string bug.  This was preventing NT from
          displaying names for well-know SIDs in printer permissions
          dialog.
(This used to be commit 59229b9025)
2001-01-15 18:36:50 +00:00
Tim Potter
99f3694436 Compile fix for smbw_dir_add function.
(This used to be commit d7920a670b)
2001-01-15 17:46:02 +00:00
Andrew Tridgell
fc06a034e8 removed unnecessary process_exists() call in message_send_pid()
it slows us down and doesn't gain anything
(This used to be commit 30fb31a3ab)
2001-01-15 01:47:00 +00:00
Richard Sharpe
552d6bce08 Fixed bugs relating to Win2K and the need for a codepage so that unicode
strings can be handled correctly.
(This used to be commit 5629b097d4)
2001-01-14 00:11:29 +00:00
Herb Lewis
93261949f5 merge from 2.0 branch for installing Using Samba book files
(This used to be commit b04bd9ea24)
2001-01-12 21:47:01 +00:00
Tim Potter
7237fd3c85 Pass correctly formatted args to cli_spoolss_open_printer_ex()
(This used to be commit 635db9b601)
2001-01-12 19:47:08 +00:00