kai/samba.git
19 years agoExcise snprintf -> slprintf.
Jeremy Allison [Fri, 16 Feb 2001 19:21:18 +0000 (19:21 +0000)]
Excise snprintf -> slprintf.
srv_samr.c: duplicate gid fix.
srv_spoolss_nt.c: Merge of JF's work.
uid.c: Fix for returning names when a PDC.
Jeremy.
(This used to be commit d938ad6963a2dd4eda930d508600ec1902dc2b16)

19 years agoconfigure configure.in smbd/posix_acls.c smbd/dosmode.c: Fix for zero permission...
Jeremy Allison [Fri, 16 Feb 2001 00:24:43 +0000 (00:24 +0000)]
configure configure.in smbd/posix_acls.c smbd/dosmode.c: Fix for zero permission W2K profiles.
libsmb/cliconnect.c rpc_client/cli_login.c smbd/reply.c: codepage fixes from Tim.
Jeremy.
(This used to be commit 3ded1e6bd5f79948e437ce5b1799705945f36ad2)

19 years agoPatch to add UnixWare ACLs from Michael Davidson <md@sco.COM>. With some
Jeremy Allison [Thu, 15 Feb 2001 19:56:10 +0000 (19:56 +0000)]
Patch to add UnixWare ACLs from Michael Davidson <md@sco.COM>. With some
small modifications, this code may also work on Solaris, as they are derived
from the same SVR4 codebase.
When the Samba Solaris box is up and running again I will test this.
Jeremy.
(This used to be commit f8db87b0978be981448eafd57163703e3aeec2cb)

19 years agosamba/source/nmbd/nmbd.c change remote_machine name to nmbd instead
Herb Lewis [Thu, 15 Feb 2001 19:50:34 +0000 (19:50 +0000)]
samba/source/nmbd/nmbd.c change remote_machine name to nmbd instead
of nmb so we write to same log file that
was originally created as log.nmbd
samba/source/smbd/server.c change remote_machine name to smbd instead
of smb so we write to same log file that
was originally created as log.smbd
samba/source/lib/interface.c allow binding to all interface IP addresses
even if on same subnet. This allows you to
specify which IP's you want in interfaces
line and use bind interfaces only
(This used to be commit 01dfd59712f3730498784d7632da8fe0113d55b6)

19 years agoDEBUG merge from 2.2 about tdb init failure.
Herb Lewis [Thu, 15 Feb 2001 19:33:57 +0000 (19:33 +0000)]
DEBUG merge from 2.2 about tdb init failure.
Patch from David Collier-Brown to print permission error on spool file
creation.
(This used to be commit 8907a51743b7b9b9ad4168033fae4d44012cca37)

19 years agoMerge of i18n password fix for smbclient.
Tim Potter [Thu, 15 Feb 2001 05:42:04 +0000 (05:42 +0000)]
Merge of i18n password fix for smbclient.
(This used to be commit ec217eb8fc2a9cf329a51c51ba08a04fa5b008c2)

19 years agoFix from "Jim McDonough" <jmcd@us.ibm.com> for s390 Linux.
Jeremy Allison [Thu, 15 Feb 2001 00:36:23 +0000 (00:36 +0000)]
Fix from "Jim McDonough" <jmcd@us.ibm.com> for s390 Linux.
Jeremy.
(This used to be commit 493c31729f515bcc5cca99ac4fa5510604518a72)

19 years agoBaltic codepage fixes from Toomas Soome <tsoome@ut.ee>
Tim Potter [Wed, 14 Feb 2001 21:56:57 +0000 (21:56 +0000)]
Baltic codepage fixes from Toomas Soome <tsoome@ut.ee>
(This used to be commit 1f1fcea06d658375b234bbfedcabcedd01c66a88)

19 years agoUpdate to Baltic codepage support.
Tim Potter [Wed, 14 Feb 2001 21:53:07 +0000 (21:53 +0000)]
Update to Baltic codepage support.
(This used to be commit 7f1219df247553bbdb18ab9676a050aea767f40b)

19 years agoMerge of i18n fixes from appliance branch. Samba can now talk to a network
Tim Potter [Wed, 14 Feb 2001 05:34:50 +0000 (05:34 +0000)]
Merge ... i18n fixes from appliance branch.  Samba can now talk to a network
with a PDC that has international netbios name and domain name.  There's
still quite a bit of i18n stuff to fix though...
(This used to be commit 79045bd72ace9144e7dd73785b1d10a71b0d15aa)

19 years agoIt compiles for me now :-). rpc_server/srv_lsa.c - added fix to allow w2k
Jeremy Allison [Tue, 13 Feb 2001 16:28:48 +0000 (16:28 +0000)]
It compiles for me now :-). rpc_server/srv_lsa.c - added fix to allow w2k
clients to join a Samba domain - odd or even domain name length. Needs more testing.
Jeremy.
(This used to be commit 408672d38261e34cc3714200617b35464d88f931)

19 years agochange pstrcpy() in setup_pwret() to fstrcpy() since we are
Gerald Carter [Tue, 13 Feb 2001 07:17:07 +0000 (07:17 +0000)]
change pstrcpy() in setup_pwret() to fstrcpy() since we are
using fstrings.  Spotted by Elrond.  Thanks :-)

jerry
(This used to be commit a55a4fea9728550c4d28b05910c0b7d5080714b3)

19 years agoFixup missing tests on code imported from tng.
Jeremy Allison [Tue, 13 Feb 2001 00:32:07 +0000 (00:32 +0000)]
Fixup missing tests on code imported from tng.
Jeremy.
(This used to be commit 41d46a495b9e223d05bfc00e76612149531ec69a)

19 years agoFix for DACL/SACL masking typo - spotted by medha@pezman.austin.ibm.com.
Jeremy Allison [Mon, 12 Feb 2001 22:37:40 +0000 (22:37 +0000)]
Fix for DACL/SACL masking typo - spotted by medha@pezman.austin.ibm.com.
Jeremy.
(This used to be commit 8fc6bc170fd3dd1fd9437d4acc94bd251c35d544)

19 years agoMerge of JohnR's changes to appliance-head, JF's changes to 2.2,
Jeremy Allison [Mon, 12 Feb 2001 16:18:02 +0000 (16:18 +0000)]
Merge ... JohnR's changes to appliance-head, JF's changes to 2.2,
updated the POSIX_ACL code to be in sync.
Jeremy.
(This used to be commit c0517d6f4e3079feca1309fd1ea7b21e83f0de02)

19 years agoFix calls to smbc_init in testsmbc.c and tree.c
Richard Sharpe [Mon, 12 Feb 2001 12:31:05 +0000 (12:31 +0000)]
Fix calls to smbc_init in testsmbc.c and tree.c
(This used to be commit 244edad065a48c110d73617e6c76bdae0ab6885d)

19 years agoAdded commented/documented version of libsmbclient.h and fixed up a small
Richard Sharpe [Mon, 12 Feb 2001 12:17:54 +0000 (12:17 +0000)]
Added commented/documented version of libsmbclient.h and fixed up a small
problem in libsmbclient.c where we no longer pass the workgroup.
(This used to be commit 3c6611434601a45ba448f0313397104c7cea616c)

19 years agoUpdated proto.h
Tim Potter [Sun, 11 Feb 2001 22:36:20 +0000 (22:36 +0000)]
Updated proto.h
(This used to be commit 0102eea147d45c410842a25705b7be9fc3892cca)

19 years agoEnsure people know this is unused.
Jeremy Allison [Sun, 11 Feb 2001 21:02:11 +0000 (21:02 +0000)]
Ensure people know this is unused.
Jeremy.
(This used to be commit 4f87f0f4027a0b78e091b5daaf6fb907b5811044)

19 years agoreverted *.* patch until someone explains to me what the test case is
Andrew Tridgell [Thu, 8 Feb 2001 23:33:50 +0000 (23:33 +0000)]
reverted *.* patch until someone explains to me what the test case is
that requires this.

i _know_ that this isn't the right solution and it breaks things,
which is why I am reverting now.
(This used to be commit c2a82a33da1b717b16fb71e597587c806bcf68b3)

19 years agomerge from SAMBA_2_2
Gerald Carter [Thu, 8 Feb 2001 20:47:09 +0000 (20:47 +0000)]
merge from SAMBA_2_2
(This used to be commit 9347121ce6888afeae3cdf256b5f0c5b9c58b0bc)

19 years agoreplaced inet_aton() with inet_addr() to keep Solaris from complaining.
Gerald Carter [Thu, 8 Feb 2001 18:41:01 +0000 (18:41 +0000)]
replaced inet_aton() with inet_addr() to keep Solaris from complaining.

jerry
(This used to be commit 2b18c4484313e77d98c8a7524cf9f5cc2c924dc2)

19 years agoadd pam_setcred() call to pam_auth(). Patch was submited last Oct.
Gerald Carter [Thu, 8 Feb 2001 18:39:36 +0000 (18:39 +0000)]
add pam_setcred() call to pam_auth().  Patch was submited last Oct.

jerry
(This used to be commit 57165d1578eefa270d5c0bd8697a774eb8cb06cf)

19 years agoAdd Makefile.in target for installing smbclientlib ...
Richard Sharpe [Wed, 7 Feb 2001 19:41:19 +0000 (19:41 +0000)]
Add Makefile.in target for installing smbclientlib ...
(This used to be commit 2b9c6d1c9e278caccd202c1d3b07690c0423acc1)

19 years agoFix problems in libsmbclient with pring job struct plus add implementation
Richard Sharpe [Tue, 6 Feb 2001 19:25:12 +0000 (19:25 +0000)]
Fix problems in libsmbclient with pring job struct plus add implementation
of last two print routines ...
(This used to be commit 7c50af3b71eeedfef8ed0d5771c2dc578fa95741)

19 years agoImplement two printing related functions and start the remaining two.
Richard Sharpe [Mon, 5 Feb 2001 13:02:20 +0000 (13:02 +0000)]
Implement two printing related functions and start the remaining two.
(This used to be commit c19559a286c3ec6dedefbd2423aa5738edd9ba41)

19 years agoFix some further small bugs in libsmbclient to make it pass the
Richard Sharpe [Sun, 4 Feb 2001 19:48:26 +0000 (19:48 +0000)]
Fix some further small bugs in libsmbclient to make it pass the
Caldera test suite and start to add the printing routines.
(This used to be commit 838cfad404ef648ee7909f449264afa4db60fa3b)

19 years agomerge from APPLIANCE_HEAD (mapping access_required 0x0 to
Gerald Carter [Sat, 3 Feb 2001 23:45:59 +0000 (23:45 +0000)]
merge from APPLIANCE_HEAD (mapping access_required 0x0 to
PRINTER_ACCESS_USE)
(This used to be commit 0c57b05de46f04dda941fcb4ba4f2a5a88b8dc9f)

19 years agoMerge from 2.2 - with connection fix.
Jeremy Allison [Sat, 3 Feb 2001 17:19:10 +0000 (17:19 +0000)]
Merge from 2.2 - with connection fix.
Jeremy.
(This used to be commit 8d3601c1366b5f0a9f5772e9797ff54a2250dbfd)

19 years agoConvert netbios name to dos codepage in make_nmb_name(). This allows
Tim Potter [Fri, 2 Feb 2001 17:42:00 +0000 (17:42 +0000)]
Convert netbios name to dos codepage in make_nmb_name().  This allows
nmblookup and smbclient to work with i18n netbios names.
(This used to be commit 2eabb7c229fb8a64d47757f291b327f5b7f26b55)

19 years agoAdded Baltic codepage support. From Toomas Soome <tsoome@ut.ee>
Tim Potter [Fri, 2 Feb 2001 17:31:33 +0000 (17:31 +0000)]
Added Baltic codepage support.  From Toomas Soome <tsoome@ut.ee>
(This used to be commit d0c5339486c38b988d39fbf83bfb98c1258dd98d)

19 years agoChanges from SAMBA_2_2:
David O'Neill [Wed, 31 Jan 2001 18:34:49 +0000 (18:34 +0000)]
Changes from SAMBA_2_2:
    source/rpc_server/srv_spoolss_nt.c
    source/rpc_server/srv_spoolss.c
    source/include/proto.h
        - correct checking of access_required in openprinterex as talked
          with John R. and Jerry.
          You can only do server stuff (adding printers, changing forms,
          ..) if you're root or if user is in printer admin list.
          Printers options are grayed if you don't have the
          PRINTER_ADMINISTER flag in the secdesc.
(This used to be commit f449d871bf0c385d8c57de2d795e1d7ef7f256f7)

19 years agoFixed duplicate free_sec_acl() call in free_sec_desc() function.
Tim Potter [Wed, 31 Jan 2001 17:16:09 +0000 (17:16 +0000)]
Fixed duplicate free_sec_acl() call in free_sec_desc() function.

From "Richard Bollinger" <rabollinger@home.com>
(This used to be commit 5b38513cef0cfeff09f54f855f9ace292050375c)

19 years agoMissing sys_endpwent() call in get_passwd_entries()
Tim Potter [Wed, 31 Jan 2001 17:11:58 +0000 (17:11 +0000)]
Missing sys_endpwent() call in get_passwd_entries()
(This used to be commit a86f219f2f63f63e43d5b99e3d190a536954d400)

19 years agoFix for KOI8-R codepage from Andrey Kiselev <dron@at1895.spb.edu>
Tim Potter [Wed, 31 Jan 2001 17:09:13 +0000 (17:09 +0000)]
Fix for KOI8-R codepage from Andrey Kiselev <dron@at1895.spb.edu>
(This used to be commit 7a08c3a699142fa8079c2736ed70aef0528ad578)

19 years agolib/system.c: Fix for pw caching.
Jeremy Allison [Wed, 31 Jan 2001 05:14:31 +0000 (05:14 +0000)]
lib/system.c: Fix for pw caching.
srv_samr.c: Fix for pw caching.
smbd/nttrans.c: Fix to allow trans create to set ACL on open.
Jeremy.
(This used to be commit c4f810a7588a2faf41f4222dc77678c53ab1dec0)

19 years agoTurned down noisy debug statement.
Tim Potter [Tue, 30 Jan 2001 17:08:44 +0000 (17:08 +0000)]
Turned down noisy debug statement.

From "Richard Bollinger" <rabollinger@home.com>
(This used to be commit 1ec44d62eed67d88f59417d20680a073918626bd)

19 years agoFix inspited by Alan Romeril. 50% speedup in domain logins with this
Jeremy Allison [Tue, 30 Jan 2001 00:37:12 +0000 (00:37 +0000)]
Fix inspited by Alan Romeril. 50% speedup in domain logins with this
change to default break response time of 10ms -> 0ms.
Jeremy.
(This used to be commit 541c7df16fff03f98c253a46b501574cafb4469f)

19 years agoChanges from APPLIANCE_HEAD:
David O'Neill [Mon, 29 Jan 2001 21:34:08 +0000 (21:34 +0000)]
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 025f7a092ad258ff774e3f5e53737f8210cc8af6)

19 years agoChanges from SAMBA_2_2:
David O'Neill [Mon, 29 Jan 2001 21:32:45 +0000 (21:32 +0000)]
Changes from SAMBA_2_2:
- fix typo in cast from talloc
(This used to be commit f24aa0b51f06b8181b46bb1d2e73d91e5159fe1c)

19 years agoFix some bugs and prepare for some other bug fixes ...
Richard Sharpe [Mon, 29 Jan 2001 09:34:24 +0000 (09:34 +0000)]
Fix some bugs and prepare for some other bug fixes ...
(This used to be commit 4ae7812353c0ed088fb1ae4cd79c99daab363d1c)

19 years agoAdd an extra error code translation to clierror.c so that libsmbclient
Richard Sharpe [Mon, 29 Jan 2001 04:52:12 +0000 (04:52 +0000)]
Add an extra error code translation to clierror.c so that libsmbclient
gets some more error codes correct ...
(This used to be commit bca6b7dd20839a15aa97b4e6ba03c60eab9ed237)

19 years agoChanges from APPLIANCE_HEAD:
David O'Neill [Fri, 26 Jan 2001 18:13:17 +0000 (18:13 +0000)]
Changes from APPLIANCE_HEAD:
    source/printing/nt_printing.c
        - fix for Win2k sending NULL devicemode in setprinter calls which
          was making NT4 grumpy.  The solution is to never set a NULL
          devicemode if we previously had a valid one in the printer's TDB
          entry.
(This used to be commit b9036a07781724d58b34da3b6e876dd28d5f70a6)

19 years agoChanges from APPLIANCE_HEAD:
David O'Neill [Thu, 25 Jan 2001 20:15:32 +0000 (20:15 +0000)]
Changes from APPLIANCE_HEAD:
    source/rpc_server/srv_spoolss_nt.c
        - Changed the se_access_check() call in _spoolss_open_printer_ex()
          to a print_access_check().  This allows the 'printer admins'
          smb.conf and other permission override parameters to affect the
          result of a printer open.
        - Don't perform access check when opening a handle on a print
          server as it breaks browsing the Printers folder.
(This used to be commit bbe51d4b5f6da4c7668214511e25eff098bf03b1)

19 years agoChanges from APPLIANCE_HEAD:
David O'Neill [Thu, 25 Jan 2001 16:36:42 +0000 (16:36 +0000)]
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 b4c98196fc65e8b3bce928296e854987622eae78)

19 years agoRemove an inet_aton so that this code will compile on Solaris ...
Richard Sharpe [Thu, 25 Jan 2001 13:47:13 +0000 (13:47 +0000)]
Remove an inet_aton so that this code will compile on Solaris ...

Ahhh, the sweet smell of portability.
(This used to be commit 09902d2d4a51b134190861fbb3ddaabcae5bc1bb)

19 years agoio_bufsize was set too large and so full length reads
Anton Blanchard [Thu, 25 Jan 2001 06:40:44 +0000 (06:40 +0000)]
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 b91f9064673a8ff11a3c0ea2ac40c3f39fa2a2d7)

19 years agoFixes from appliance-head for pdc searches.
Jeremy Allison [Thu, 25 Jan 2001 02:59:13 +0000 (02:59 +0000)]
Fixes from appliance-head for pdc searches.
Jeremy.
(This used to be commit d04ed97ecab846def8467f313a71ef0e5c4005f6)

19 years agoFixed "object picker can't determine if object in domain" bug seen from W2K
Jeremy Allison [Thu, 25 Jan 2001 02:35:50 +0000 (02:35 +0000)]
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 f76dc952f70862a6a390e9f35edd651867842a01)

19 years agofixed pipe in smb.conf description
Andrew Tridgell [Thu, 25 Jan 2001 01:01:26 +0000 (01:01 +0000)]
fixed pipe in smb.conf description
(This used to be commit b987ce37ce1bc89d3ab4964ebed1143b29c23cfb)

19 years agoFix insure problems with passwd caching code.
Jeremy Allison [Wed, 24 Jan 2001 22:31:43 +0000 (22:31 +0000)]
Fix insure problems with passwd caching code.
Jeremy.
(This used to be commit 2bd4f163890be58456a7e49b1adbed3f5834ff9e)

19 years agoSync up with POSIX ACL code from 2.2.
Jeremy Allison [Wed, 24 Jan 2001 21:54:44 +0000 (21:54 +0000)]
Sync up with POSIX ACL code from 2.2.
Jeremy.
(This used to be commit e0431672cc54ed09d6c5cf083054db12ccd9dcf6)

19 years agoAdded modification to Richard Bollinger getpw[nam|uid] cache patch. Only
Jeremy Allison [Wed, 24 Jan 2001 21:46:16 +0000 (21:46 +0000)]
Added modification to Richard Bollinger getpw[nam|uid] cache patch. Only
uses cache max 100 times.
Jeremy.
(This used to be commit 3712e35c5460d341ba750fe5e7bce8ef63c9f8ef)

19 years agosmbd/process.c: & type with 0xff for paranioa sake...
Jeremy Allison [Wed, 24 Jan 2001 19:34:53 +0000 (19:34 +0000)]
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 a72d12e992e2755e925032aef1aa99be74bf6652)

19 years agosmbd/lanman.c: Fix for calling qsort with 0 number.
Jeremy Allison [Wed, 24 Jan 2001 19:04:56 +0000 (19:04 +0000)]
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 a958f7822e095367efb8749b6f1f2e110ffb8866)

19 years agoChanges from APPLIANCE_HEAD:
David O'Neill [Wed, 24 Jan 2001 16:46:08 +0000 (16:46 +0000)]
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 be61c98832d0a8969e608fd22da2035e454ec788)

19 years agogetpw[nam|uid] caching patch from "Richard Bollinger"
Gerald Carter [Wed, 24 Jan 2001 15:47:31 +0000 (15:47 +0000)]
getpw[nam|uid] caching patch from "Richard Bollinger"
<rabollinger@home.com>

jerry
(This used to be commit 158430ba6a030061bc7d7b84126c6f7ea0041c91)

19 years agofixed typo in debug statement
Gerald Carter [Wed, 24 Jan 2001 15:41:07 +0000 (15:41 +0000)]
fixed typo in debug statement

jerry
(This used to be commit a28d384e4d7aff1578f22947d34338b75ceab76d)

19 years agoFix a problem with smbc_unlink on directories where it was returning EACCES
Richard Sharpe [Wed, 24 Jan 2001 12:32:20 +0000 (12:32 +0000)]
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 68614bac5a1a4109fdfb728aeae6956b13c64d8f)

19 years agoFix from Kenichi Okuyama for memory leak on Realloc fail.
Jeremy Allison [Tue, 23 Jan 2001 22:21:46 +0000 (22:21 +0000)]
Fix from Kenichi Okuyama for memory leak on Realloc fail.
Jeremy.
(This used to be commit 6e568332254cf60d6a1f411df960ac2ec5f4bf8e)

19 years agoincrease MAX_POL_HNDS (merge from 2.2)
Gerald Carter [Tue, 23 Jan 2001 22:14:33 +0000 (22:14 +0000)]
increase MAX_POL_HNDS (merge from 2.2)

--jerry
(This used to be commit a946d13e0ce8afb509ff24bc8035c7c4d09bcf8b)

19 years agoonly add the service name and client machine name to list of users names
Gerald Carter [Tue, 23 Jan 2001 22:13:41 +0000 (22:13 +0000)]
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 22d6c2c163dd578365bff85ef95abfa59fe356ea)

19 years agoChanges from APPLIANCE_HEAD:
David O'Neill [Tue, 23 Jan 2001 20:25:25 +0000 (20:25 +0000)]
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 02f154e729b0e8465d3e1e2ac794e6ab3844ce57)

19 years agoChanges from APPLIANCE_HEAD:
David O'Neill [Tue, 23 Jan 2001 17:39:03 +0000 (17:39 +0000)]
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 0ccc552203d6432cde844c5946b203b27f257b1a)

19 years agoSome systems don't support SEC_RIGHTS_MAXIMUM_ALLOWED for lsa_open_policy()
Tim Potter [Tue, 23 Jan 2001 17:33:35 +0000 (17:33 +0000)]
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 394e17645b777be767cd1c69be3f5efe7a703d85)

19 years agoPatch to get smbcacls and rpcclient to compile together.
Tim Potter [Tue, 23 Jan 2001 17:32:47 +0000 (17:32 +0000)]
Patch to get smbcacls and rpcclient to compile together.
(This used to be commit 5a9870f22d4995ec1fc242169ffc1e85da04a3c4)

19 years agoinclude/vfs.h:
Jeremy Allison [Tue, 23 Jan 2001 01:52:30 +0000 (01:52 +0000)]
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 2844ec3d511680609d6794b8718001a1bda9e89f)

19 years agoChanges from APPLIANCE_HEAD:
David O'Neill [Mon, 22 Jan 2001 19:46:22 +0000 (19:46 +0000)]
Changes from APPLIANCE_HEAD:
source/printing/printing.c
- remove unused variable
(This used to be commit 2d09b53b3a9201c2f52306fc12ab01a92e712db2)

19 years agoChanges from APPLIANCE_HEAD:
David O'Neill [Mon, 22 Jan 2001 16:59:24 +0000 (16:59 +0000)]
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 0235fbef37b400a2bf875163878e497282cd1739)

19 years agoChanges from SAMBA_2_2:
David O'Neill [Mon, 22 Jan 2001 16:11:33 +0000 (16:11 +0000)]
Changes from SAMBA_2_2:
    docs/yodldocs/smb.conf.5.yo
        - add comment about ability to include environment variables in
          smb.conf.  Added just to mention it, probably needs improvement.
(This used to be commit 50c5ee3c7b41add594e151aa301143a5a60351dc)

19 years agoSmall bugfix from Kenichi Okuyama <okuyamak@dd.iij4u.or.jp>:
David O'Neill [Mon, 22 Jan 2001 15:30:38 +0000 (15:30 +0000)]
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 0233ba442643ad13b3707b63046691287fd2b449)

19 years agoChanges from APPLIANCE_HEAD:
David O'Neill [Fri, 19 Jan 2001 16:58:23 +0000 (16:58 +0000)]
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 f07f4e9c7b9bb5230f10fffe50beab163b6f7790)

19 years agoChanges from APPLIANCE_HEAD:
David O'Neill [Fri, 19 Jan 2001 16:57:39 +0000 (16:57 +0000)]
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 0068b7741fd54706ef36ddbbc3092389d281e684)

19 years agoChanges from APPLIANCE_HEAD:
David O'Neill [Fri, 19 Jan 2001 16:56:58 +0000 (16:56 +0000)]
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 f125b9a94413fd481ae9f05ec5096ef79f0d49e4)

19 years agoChanges from APPLIANCE_HEAD:
David O'Neill [Thu, 18 Jan 2001 16:13:03 +0000 (16:13 +0000)]
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 1b6efd18943ef3ed0e2e061495d05cfdecd86c88)

19 years agoGet the logic right thistime :-(.
Jeremy Allison [Wed, 17 Jan 2001 23:47:08 +0000 (23:47 +0000)]
Get the logic right thistime :-(.
Jeremy.
(This used to be commit 83596034cdecc7b03e35c0b4bb149e6bf9cebc70)

19 years agoTypo in new file_chmod code caused file attribute changes to fail.
Jeremy Allison [Wed, 17 Jan 2001 23:41:01 +0000 (23:41 +0000)]
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 b92ccc0c8e5d066eeb077dfced6e717cd741c7a6)

19 years agoChanges from APPLIANCE_HEAD:
David O'Neill [Wed, 17 Jan 2001 22:55:02 +0000 (22:55 +0000)]
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 7853b27bc1765d48d5f06837f8aca71a3a0d1e5d)

19 years agoCleanup of Get_Pwnam(). Adds debugging, cleans up the allow_change
David O'Neill [Wed, 17 Jan 2001 22:33:07 +0000 (22:33 +0000)]
Cleanup of Get_Pwnam().  Adds debugging, cleans up the allow_change
codepath.
(This used to be commit 767f73aee62438d74248facf7122b2c49645d5c7)

19 years agoChanges from APPLIANCE_HEAD:
David O'Neill [Wed, 17 Jan 2001 19:16:05 +0000 (19:16 +0000)]
Changes from APPLIANCE_HEAD:
    source/smbd/lanman.c
        - Change fill_printq_info() to fix corrupted 9X/ME printer comment
(This used to be commit acbed88a195b32d251fd15fc8fdd069726659d64)

19 years agoChanges from APPLIANCE_HEAD:
David O'Neill [Wed, 17 Jan 2001 18:47:46 +0000 (18:47 +0000)]
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 7b774b72c2857af9519012106714a9e2cb099da3)

19 years agoSet the tdb->map_ptr to NULL if mmap() returns -1.
Tim Potter [Tue, 16 Jan 2001 18:33:05 +0000 (18:33 +0000)]
Set the tdb->map_ptr to NULL if mmap() returns -1.
(This used to be commit cef7f58ac5cc0c96e1027c7e5ecbb3fb72cb94b6)

19 years agoChanges from APPLIANCE_HEAD:
David O'Neill [Tue, 16 Jan 2001 18:17:55 +0000 (18:17 +0000)]
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 6a1f55b3255f216a5ddc73f94c6cb5a2490c3bbb)

19 years agoFix for no master browser present.
Tim Potter [Tue, 16 Jan 2001 17:48:39 +0000 (17:48 +0000)]
Fix for no master browser present.
(This used to be commit 24c78fdf5fb940b32724474241c464206b83be2f)

19 years agoSome ugly mucking around to get the new rpcclient compiling and linking
Tim Potter [Mon, 15 Jan 2001 23:53:33 +0000 (23:53 +0000)]
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 6d61f11788b8868e3396559307157edd1f39a84f)

19 years agoNew proto and some small changes to rpc_samr.h
Tim Potter [Mon, 15 Jan 2001 23:39:20 +0000 (23:39 +0000)]
New proto and some small changes to rpc_samr.h
(This used to be commit 7f31d4ab1da72fe1dd52c7ecc1c758e210b6d38d)

19 years agorpcclient functions for remaining samr and lsa functions. All functions
Tim Potter [Mon, 15 Jan 2001 23:35:59 +0000 (23:35 +0000)]
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 76f08426a08881793b0ef32ccc4e13c54f26417f)

19 years agoAdded remaining samr functions needed by winbindd.
Tim Potter [Mon, 15 Jan 2001 23:34:32 +0000 (23:34 +0000)]
Added remaining samr functions needed by winbindd.

Added #define/#undef NEW_NTDOMAIN symbols.
(This used to be commit 13e4fd1d84ab1150446530b11c47c4d6617014cb)

19 years agoFixes for POSIX ACLS. ACL merge code.
Jeremy Allison [Mon, 15 Jan 2001 22:46:22 +0000 (22:46 +0000)]
Fixes for POSIX ACLS. ACL merge code.
Jeremy.
(This used to be commit 180e4a9cd05bcadb2f7c4c23d653724e867196f0)

19 years agoUpdated from 2.2.
Jeremy Allison [Mon, 15 Jan 2001 19:02:57 +0000 (19:02 +0000)]
Updated from 2.2.
Jeremy.
(This used to be commit 6fb5eb8b1eb7972ffafdb8a2b383c3eadf1a96ef)

19 years agoChanges from APPLIANCE_HEAD:
David O'Neill [Mon, 15 Jan 2001 18:36:50 +0000 (18:36 +0000)]
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 59229b9025cff54cbdd05e374616ffbf9c6fee33)

19 years agoCompile fix for smbw_dir_add function.
Tim Potter [Mon, 15 Jan 2001 17:46:02 +0000 (17:46 +0000)]
Compile fix for smbw_dir_add function.
(This used to be commit d7920a670b7706fc1d794edcfe6baacc5bb26403)

19 years agoremoved unnecessary process_exists() call in message_send_pid()
Andrew Tridgell [Mon, 15 Jan 2001 01:47:00 +0000 (01:47 +0000)]
removed unnecessary process_exists() call in message_send_pid()
it slows us down and doesn't gain anything
(This used to be commit 30fb31a3ab05ab6bb6c89cb457e2216e34b963e6)

19 years agoFixed bugs relating to Win2K and the need for a codepage so that unicode
Richard Sharpe [Sun, 14 Jan 2001 00:11:29 +0000 (00:11 +0000)]
Fixed bugs relating to Win2K and the need for a codepage so that unicode
strings can be handled correctly.
(This used to be commit 5629b097d4f04ad45c66f270bd58f08d7c717353)

19 years agomerge from 2.0 branch for installing Using Samba book files
Herb Lewis [Fri, 12 Jan 2001 21:47:01 +0000 (21:47 +0000)]
merge from 2.0 branch for installing Using Samba book files
(This used to be commit b04bd9ea2409ef02737fd570ce80daf167e41067)

19 years agoPass correctly formatted args to cli_spoolss_open_printer_ex()
Tim Potter [Fri, 12 Jan 2001 19:47:08 +0000 (19:47 +0000)]
Pass correctly formatted args to cli_spoolss_open_printer_ex()
(This used to be commit 635db9b6015a422505a5d8507c44e12f146597bc)

19 years agoPrinter name unistr is null terminated in make_spoolss_q_open_printer_ex()
Tim Potter [Fri, 12 Jan 2001 19:45:50 +0000 (19:45 +0000)]
Printer name unistr is null terminated in make_spoolss_q_open_printer_ex()
(This used to be commit a125eba0aac2bc6b37322a1e38e46eaac7e20d3a)

19 years agoMemory leak fixes and uninitialised variables spotted by insure.
Tim Potter [Fri, 12 Jan 2001 18:19:57 +0000 (18:19 +0000)]
Memory leak fixes and uninitialised variables spotted by insure.
(This used to be commit 079f46aca453978a5c313e90f3b24620760ebafc)

19 years agoMemory leak fixes spotted by insure.
Tim Potter [Fri, 12 Jan 2001 17:53:47 +0000 (17:53 +0000)]
Memory leak fixes spotted by insure.
(This used to be commit 8072ee62b082df5d06459667615bb3b78461ec0a)

19 years agoSome more bug fixes plus implementations of smbc_mkdir and smbc_rmdir,
Richard Sharpe [Fri, 12 Jan 2001 12:48:55 +0000 (12:48 +0000)]
Some more bug fixes plus implementations of smbc_mkdir and smbc_rmdir,
both tested ...

More later.
(This used to be commit 66bb40153a9ff38692356cadfad89cf91439032e)