samba.git
23 years agoThese two are not being used, and they would cause conflict under Andrew's
Christopher R. Hertel [Fri, 22 May 1998 06:32:07 +0000 (06:32 +0000)]
These two are not being used, and they would cause conflict under Andrew's
include scheme.  Removing them works around the problem.  If someone
does need them sometime (can't imagine why, since the splay tree is
typically faster), let me know and we can work something else out.

Chris -)-----
(This used to be commit b3c8b14a47e46e501e1684391e3706e143c2adbf)

23 years agoRemoved all ubiqx includes from includes.h. So far, this was only a problem
Christopher R. Hertel [Fri, 22 May 1998 05:16:27 +0000 (05:16 +0000)]
Removed all ubiqx includes from includes.h.  So far, this was only a problem
for dir.h, which I've fixed.  Andrew did not add includes.h to the ubiqx
headers, which is good because it would cause internal conflicts within the
ubiqx tree modules.  It's also bad because the definitions and includes
that are part of includes.h are now in the ubiqx C files, but not in the
header files.  So, if includes.h were to redefine int, for example, the
new definition would be in the ubiqx C files, but not in the headers.

So, until Andrew and I can work something out that we both agree upon,
there are three basic rules:

1) Don't include includes.h in the ubiqx headers.  Problems may arise.
2) The ubiqx headers must follow includes.h in any Samba module that
   uses them.

This can and should all be worked out.  We just have to talk about it.

Chris -)-----
(This used to be commit 2b6be7084df4ddfca3a1ab7b73304007c5f9d0aa)

23 years agoAdded a disclaimer regarding the changes Andrew wants.
Christopher R. Hertel [Fri, 22 May 1998 04:43:04 +0000 (04:43 +0000)]
Added a disclaimer regarding the changes Andrew wants.
(This used to be commit f8d6aab70a02338c923220459eb12d17fa324e79)

23 years agoPut a do_global_tests() function that will be expanded to
Jeremy Allison [Fri, 22 May 1998 01:51:14 +0000 (01:51 +0000)]
Put a do_global_tests() function that will be expanded to
test all the heuristics we know about for validating smb.conf
file.
Jeremy.
(This used to be commit 76dec5b04e9c3b4b727bf9a44d31acf32b4b6b4c)

23 years agoadded:
Andrew Tridgell [Fri, 22 May 1998 00:32:27 +0000 (00:32 +0000)]
added:

#ifdef HAVE_INCLUDES_H
#include "../includes.h"
#endif

we want _all_ code in Samba to include this file to ensure that we can
override definitions, typedefs and includes in one place.
(This used to be commit 556745037ad7efffd8276b28fed445b007eba253)

23 years agoFixed 'revalidate' parameter so it's only considered in security=share
Jeremy Allison [Thu, 21 May 1998 23:59:04 +0000 (23:59 +0000)]
Fixed 'revalidate' parameter so it's only considered in security=share
mode.
Jeremy.
(This used to be commit 7727f09ea9055053ed1d3e2af1069ddae245efb4)

23 years agoprinting.c: Fixed overflow by one problem in LPRng.
Jeremy Allison [Thu, 21 May 1998 23:50:16 +0000 (23:50 +0000)]
printing.c: Fixed overflow by one problem in LPRng.
reply.c: Fixed password length modifiers to always be done
         is none-encrypted mode used. This fixes Samba for
         people who are using non-encrypted passwords with
         security=server.
Jeremy.
(This used to be commit 720b565349e3467bd81d6d863b9ac54237edd3cf)

23 years agoAlong the lines that Andrew suggested, I added a header called ubi_null.h.
Christopher R. Hertel [Thu, 21 May 1998 17:14:20 +0000 (17:14 +0000)]
Along the lines that Andrew suggested, I added a header called ubi_null.h.
This header tries four different locations for a definition of NULL.  If
NULL still hasn't been found, it defaults to ((void *)0).  All of the
includes can be, essentially, overridden by defining NULL on the command
line, as in -DNULL=((void *)0).  I have faith that this will avoid the
problem of NULL being in different places on different systems.  If there
is a system out there that doesn't define NULL in any of the headers I've
included, then let me know *where* it's defined and I'll add another
header.  Chris -)-----
(This used to be commit 05fcc678729999f249b97460a579bdc218028a47)

23 years agofixed signed / unsigned warnings spotted by tim winders. also fixed
Luke Leighton [Thu, 21 May 1998 12:18:52 +0000 (12:18 +0000)]
fixed signed / unsigned warnings spotted by tim winders.  also fixed
unnecessary "address of" warnings.
(This used to be commit ed0afe1e186ce53046e70d8a92103d4f59a2eed2)

23 years agojean-francois calling the right function for the "net t.o.d" dce/rpc support
Luke Leighton [Thu, 21 May 1998 11:54:40 +0000 (11:54 +0000)]
jean-francois calling the right function for the "net t.o.d" dce/rpc support
does gmtime() not LocalTime() now.
(This used to be commit 64559e72f3028917059dbcafd0b3425266f7d567)

23 years agofix slprintf for sunos4 in head branch
Andrew Tridgell [Wed, 20 May 1998 21:29:32 +0000 (21:29 +0000)]
fix slprintf for sunos4 in head branch
(This used to be commit 4aaf8b6a8bc521e738840fe72708add251eaaccb)

23 years agodce/rpc net time command from jean-francois. does not support timezones
Luke Leighton [Wed, 20 May 1998 13:17:26 +0000 (13:17 +0000)]
dce/rpc net time command from jean-francois.  does not support timezones
(This used to be commit 8e11d542eebe076d74ab264e22b87f7aed9bbe8f)

23 years agoFixed incorrect last arg to safe_strcpy in new wildcard code.
Jeremy Allison [Wed, 20 May 1998 04:20:31 +0000 (04:20 +0000)]
Fixed incorrect last arg to safe_strcpy in new wildcard code.
Jeremy.
(This used to be commit 67007d98b9daf5cccf049cb836dbb989516eb0ce)

23 years agoMinor tweak for wcard compatibility paranoia.
Jeremy Allison [Wed, 20 May 1998 02:07:57 +0000 (02:07 +0000)]
Minor tweak for wcard compatibility paranoia.
Jeremy.
(This used to be commit 5d8ef7d0f1ecb358c841f382fc48e6eccbe8e171)

23 years agoFixed Samba's wildcard algorithm to be *exactly* the same
Jeremy Allison [Wed, 20 May 1998 02:01:21 +0000 (02:01 +0000)]
Fixed Samba's wildcard algorithm to be *exactly* the same
as NT.
You do not want to know how this code works :-).
Jeremy
(This used to be commit 7adbd2dfc1eda0e147b7ab4b5ff5e71f173794af)

23 years agoFix to do NT wildcard matching.
Jeremy Allison [Tue, 19 May 1998 22:06:41 +0000 (22:06 +0000)]
Fix to do NT wildcard matching.
Jeremy.
(This used to be commit 170070b9c793805df9f8629e70027f17b949425f)

23 years agopassdb.c: Fixed typo in coment.
Jeremy Allison [Tue, 19 May 1998 20:08:37 +0000 (20:08 +0000)]
passdb.c: Fixed typo in coment.
smb.h: Removed comments no longer valid.
smbpass.c: Stopped dummy function from being prototyped.
util.c: Fix for multibyte char problems with strlower, strupper
and string_replace.
Jeremy.
(This used to be commit cd244b45a5d35fceee2a4034b0c6aabdb58871aa)

23 years agomade mod_smbfilepwd_entry() and getsmbfilepwent() static. they need not
Luke Leighton [Tue, 19 May 1998 19:50:49 +0000 (19:50 +0000)]
made mod_smbfilepwd_entry() and getsmbfilepwent() static.  they need not
be exposed.
(This used to be commit 61ab72b82b24006c69b573400f740ff73e742b32)

23 years agooops - got some of the default (conversion) functions wrong.
Luke Leighton [Tue, 19 May 1998 19:41:22 +0000 (19:41 +0000)]
oops - got some of the default (conversion) functions wrong.
(This used to be commit b836581cda2b58d285245f71f2bc419c6ece4911)

23 years agoremoved "default" system for password database api: all functions must
Luke Leighton [Tue, 19 May 1998 19:17:35 +0000 (19:17 +0000)]
removed "default" system for password database api: all functions must
be supported.  there are some stub routines in passdb.c which can be
copied into a password database api which do conversion.  the module
writer can choose which of these to provide full support for instead
of using the conversion routines.
(This used to be commit d906ac5941fa22f93a38d65906b89a80f971b83c)

23 years agoldap.c :
Luke Leighton [Tue, 19 May 1998 17:48:40 +0000 (17:48 +0000)]
ldap.c :

- added support for some of the new passdb_ops functions.

- removed functions that are supported "indirectly" through passdb.c

nisppass.c :

- modified make_nisname_from_xxx() functions to take a "file" arg.

- turned getnisp21pwuid() into getnisp21pwrid().  getnisp21pwuid()
  functionality is available through "indirect" support in passdb.c

- removed functions that are supported "indirectly" through passdb.c

- added support for some of the new passdb_ops functions.

passdb.c :

- created getsam21pwrid() function to go alongside getsam21pwuid.
  it is not expected that getsam21pwuid ever be used, certainly
  not from the lib/rpc code.

- created getsamdisprid() and getsamdispent().  these are primarily
  for support of SamrQueryDisplayInfo, however given that they
  [struct sam_disp_info] return username, rid and fullname, there may
  be further instances where these functions will be useful.

- added support where either the get/add/mod-smb or get/add/mod-sam21
  functions are optional.  this can be done very easily by checking
  whether the struct passdb_ops table functions are NULL or not.

  documented this capability in the notes at the top of the module.

- where unix uid was referenced, use uid_t.

- where unix gid was referenced, use gid_t.

smb.h :

- added sam_disp_info functions to passdb_ops.

- added getsam21pwrid() function.

smbpass.c :

- added reference to iterate_getsam21pwrid().

lib/rpc/server/srv_samr.c :

- removed group rid code added to get_user_info_21() code: this
  had been added in the wrong place.  the client / server should
  already know whether it wants to do a lookup by user rid or
  by group rid.

  the test of whether the rid is a user or group rid has been left
  in because this may become useful consistency-check code.

- converted back to getsam21pwrid() not
  getsam21pwuid(pdb_user_rid_to_uid()).

  this is because the unix uid to user rid mapping can be non-monotonic
  in some password database systems, and monotonic in others.  imposing
  the restriction by converting immediately from rid to uid at this
  point is inadviseable, and will place this potential restriction on
  _all_ password database systems, not just some which, for whatever
  reason, do not support user rids.

  it should be up to the individual password database writer to
  convert from user rid to unix uid, should that module not support
  rids.

lib/rpc/server/srv_util.c :

- got lookup_user_name() to call getsamdisprid() not getsmbpwuid().
  a bug was introduced (or at least the bug already there was not
  fixed) whereby the nt user rid was converted to a unix uid, and
  then not used.
(This used to be commit 0193dd21c3c44e0611add742c6f92b92474de6b8)

23 years agoFixed signed/unsigned warning.
Jeremy Allison [Tue, 19 May 1998 04:49:56 +0000 (04:49 +0000)]
Fixed signed/unsigned warning.
Jeremy.
(This used to be commit 6b6539cad8962f2913d892abae811afc72432678)

23 years agoForgot to add the initialize_password_db() call to nmbd also.
Jeremy Allison [Tue, 19 May 1998 04:45:40 +0000 (04:45 +0000)]
Forgot to add the initialize_password_db() call to nmbd also.
Jeremy.
(This used to be commit 2f9f0a88e8220575edb43a9945d0b60829efa840)

23 years agoAbstracted all the crappy password interfaces through an indirect
Jeremy Allison [Mon, 18 May 1998 23:57:28 +0000 (23:57 +0000)]
Abstracted all the crappy password interfaces through an indirect
function table, selectable at compile time. This should make the
code that implements all the password functions much cleaner, as
it's now very clear exactly what a particular password database
needs to provide to Samba.
Jeremy.
(This used to be commit 27ca536ad974242524c12f7100e419d9e7f9647f)

23 years agochgpasswd.c: Changed back to getsmb... from getsam...
Jeremy Allison [Mon, 18 May 1998 21:30:57 +0000 (21:30 +0000)]
chgpasswd.c: Changed back to getsmb... from getsam...
ldap.c: Stoped dummy_function being prototyped.
loadparm.c: Fixed slprintf sizes.
nisppass.c: Fixed safe_strcpy sizes.
nmbd_processlogon.c: Changed back to getsmb... from getsam...
nttrans.c: Just a dump of new code.
passdb.c: Moved stuff around a lot - stopped any lookups by rid. This
          needs to be indirected through a function table (soon).
password.c: Changed back to getsmb... from getsam...
reply.c: Changed back to getsmb... from getsam...
slprintf.c: Fixed prototype problems.
smb.h: Fixed prototype problems.
smbpass.c: Changed to getsmbfile....
smbpasswd.c: Changed back to getsmb... from getsam...
lib/rpc/server/srv_netlog.c: Changed back to getsmb... from getsam...
lib/rpc/server/srv_samr.c: Fixed rid lookup - use uid or gid lookup.
lib/rpc/server/srv_util.c: Changed back to getsmb... from getsam...
Jeremy.
(This used to be commit 7d332b2493d2089d09521250fc9b72d8953307c0)

23 years agolinker errors with -DUSE_NISPLUS_DB - difficult to spot when you're not
Luke Leighton [Mon, 18 May 1998 17:15:21 +0000 (17:15 +0000)]
linker errors with -DUSE_NISPLUS_DB - difficult to spot when you're not
using nis+ on your system, so you get 100 linker errors...
(This used to be commit e325d9a81039152e8c57f7fab6cf948d8e1ec7d3)

23 years agosorting out removal of some smb_passwd functions by calling pdb_smb_to_sam()
Luke Leighton [Mon, 18 May 1998 17:10:57 +0000 (17:10 +0000)]
sorting out removal of some smb_passwd functions by calling pdb_smb_to_sam()
instead, for use by nisppass.c
(This used to be commit 2253ca407267eb161cfcd8b53dcc9848d9398f4c)

23 years agoremoved references to some of the smb_passwd routines from ldap and nis+
Luke Leighton [Mon, 18 May 1998 15:50:56 +0000 (15:50 +0000)]
removed references to some of the smb_passwd routines from ldap and nis+
code, use pdb_sam_to_smb(...sam21...) calls instead.  this is a lot simpler.
(This used to be commit d92f4e71c12ce5010f05fa7dd3918a48e7386d1e)

23 years agocreating and using some pdb_init_(sam/smb) routines. putting ldap headers
Luke Leighton [Mon, 18 May 1998 14:55:17 +0000 (14:55 +0000)]
creating and using some pdb_init_(sam/smb) routines.  putting ldap headers
back in (they had been taken out of includes.h because they are only
local to ldap.c.
(This used to be commit 98ab085b93fb25a4d9275c0d54a863fd9fae2548)

23 years agono include headers in ldap.c.
Luke Leighton [Mon, 18 May 1998 14:43:06 +0000 (14:43 +0000)]
no include headers in ldap.c.
passdb.c sam_passwd <-> smb_passwd conversion routines
(This used to be commit 8082239c81dfed5e3cc34a4d0a4e7195398ae627)

23 years agoresolving compilation errors
Luke Leighton [Mon, 18 May 1998 14:17:47 +0000 (14:17 +0000)]
resolving compilation errors
(This used to be commit dea0c06eec44a7c2860f97d8f23584d30e482e0a)

23 years agoreceived update from jean francois for ldap.c: he is doing add / mod
Luke Leighton [Mon, 18 May 1998 14:06:49 +0000 (14:06 +0000)]
received update from jean francois for ldap.c: he is doing add / mod
functions
(This used to be commit 381df1e52bfc97b80422de2703db8cb521dc47e1)

23 years ago- renamed some of the passdb.c functions: they have a prefix pdb_ on them
Luke Leighton [Mon, 18 May 1998 12:27:04 +0000 (12:27 +0000)]
- renamed some of the passdb.c functions: they have a prefix pdb_ on them

- split smbpass.c "password file lock" routines into smbpassfile.c: moved
  trust account routines into smbpassfile.c as well
(This used to be commit 3e48b4eb113cc5e1c6794d7ac699fd9ac47c654a)

23 years agooops. pressed ctrl-z while editing the previous cvs message: this was
Luke Leighton [Mon, 18 May 1998 11:59:19 +0000 (11:59 +0000)]
oops.  pressed ctrl-z while editing the previous cvs message: this was
taken to mean ":x".
(This used to be commit 660206e816f9be708e09a1aad3b342b94e5e4f53)

23 years agoMakefile:
Luke Leighton [Mon, 18 May 1998 11:54:00 +0000 (11:54 +0000)]
Makefile:

- added nisppass.c and NISPLUS_FLAGS

includes.h:

- renamed USE_LDAP to USE_LDAP_DB.  renamed NISPLUS to USE_NISPLUS_DB.
added default define of USE_SMBPASS_DB.

- removed ldap headers: they are local only to ldap.c

ldap.c :

- made all ldap-specific functions static.

- added dummy sam21 functions

loadparm.c :

- renamed NISPLUS to NISPLUS_HOME

mkproto.awk

- commented out ldap-specific #ifdef generation code: it's not
  needed now that ldap-specific functions in ldap.c are static

nisppass.c :

- first attempt at an add function from
(This used to be commit f215d375f0f1e12894c2a9e86bd28d4776d337c1)

23 years agoChange getpwnam to Get_Pwnam(xx , True) to allow lazy matching
Jeremy Allison [Fri, 15 May 1998 23:10:46 +0000 (23:10 +0000)]
Change getpwnam to Get_Pwnam(xx , True) to allow lazy matching
in /etc/passwd. Fix from "Mike Black" <mblack@csihq.com>.
Jeremy.
(This used to be commit 0146883f8568de4642087bb769b0381c3217d792)

23 years agoFix from "Gerald W. Carter" <cartegw@eng.auburn.edu>, we were
Jeremy Allison [Fri, 15 May 1998 22:29:42 +0000 (22:29 +0000)]
Fix from "Gerald W. Carter" <cartegw@eng.auburn.edu>, we were
copying from a parameter into an unitialized variable (doh !).
Jeremy.
(This used to be commit a3a0dc14c2f9f703963ade67f30dd6c40bbe7144)

23 years agosome databases have search capabilities. acknowledging this in design
Luke Leighton [Fri, 15 May 1998 14:50:35 +0000 (14:50 +0000)]
some databases have search capabilities.  acknowledging this in design
of passdb.c api.
(This used to be commit 2dd01b7c70f7e1f3158bd4bc75459892007e5418)

23 years agofirst non-compiling, unused, mostly stub version of NIS+ password database.
Luke Leighton [Fri, 15 May 1998 14:49:48 +0000 (14:49 +0000)]
first non-compiling, unused, mostly stub version of NIS+ password database.
based on Benny Holmgren's samba patch (copyright acknowledged).
(This used to be commit 2a87cf09572bd2154d4b373e1aa2171106e96da7)

23 years agoadding copyright messages for Benny Holmgren
Luke Leighton [Fri, 15 May 1998 14:48:25 +0000 (14:48 +0000)]
adding copyright messages for Benny Holmgren
(This used to be commit d7ed2ee35c76a19e93453c23b5e56874b72cc0e5)

23 years agotwo scripts from benny holmgren which a) create NIS+ table b) populate it
Luke Leighton [Fri, 15 May 1998 14:47:01 +0000 (14:47 +0000)]
two scripts from benny holmgren which a) create NIS+ table b) populate it
from private/smbpasswd.
(This used to be commit 1acdd9fd6c391ad4871c55c0ba8f5b00076ba115)

23 years agoutil.c: Re-seed the crypto random number generator after a fork, so all
Jeremy Allison [Fri, 15 May 1998 00:39:46 +0000 (00:39 +0000)]
util.c: Re-seed the crypto random number generator after a fork, so all
        smbds started from the same parent won't use the same sequence.
Jeremy.
(This used to be commit d3f507d05df9d0dd313b39bc99ebf11451dc0120)

23 years agopassdb.c
Jeremy Allison [Thu, 14 May 1998 21:10:49 +0000 (21:10 +0000)]
passdb.c
server.c: Moved generate_machine_sid() into passdb.c for Jean-Francois
          (who might want an LDAP version). Changed locking to free exclusive
          lock as soon as possible to prevent contention.
lib/rpc/parse/parse_samr.c
lib/rpc/server/srv_samr.c: Changed last SID-as-string manipulation
                           function to use DOM_SID structure.
Jeremy.
(This used to be commit 3b8f5aef57b4f37265c0403385053085f0df6f18)

23 years agosync with 1.9.18 branch (clean up comments)
Herb Lewis [Thu, 14 May 1998 19:04:29 +0000 (19:04 +0000)]
sync with 1.9.18 branch (clean up comments)
(This used to be commit b924e378f82bfca23b47261a5d0991635b2962ba)

23 years agosome pretty horrible formatting in standard_sub_basic(): makes the function
Luke Leighton [Thu, 14 May 1998 14:01:09 +0000 (14:01 +0000)]
some pretty horrible formatting in standard_sub_basic(): makes the function
unreadable and unmaintainable
(This used to be commit eefeb61242449ea2a8d5f64e15d37f90789bdacc)

23 years agorobert frank - some Next3 compilation errors detected.
Luke Leighton [Thu, 14 May 1998 11:16:18 +0000 (11:16 +0000)]
robert frank - some Next3 compilation errors detected.
(This used to be commit da3d9602c71094df4dba0edd45ade71555f5e97b)

23 years agoFixed dce/rpc to use global_machine_sid (auto generated in server.c if
Jeremy Allison [Thu, 14 May 1998 03:32:21 +0000 (03:32 +0000)]
Fixed dce/rpc to use global_machine_sid (auto generated in server.c if
not present in smb.conf).
Jeremy.
(This used to be commit e7c1100390b714bf2f489a9032156b0c9272e403)

23 years agonamequery.c: Fixed SGI IRIX 5.x compiler problem.
Jeremy Allison [Thu, 14 May 1998 03:20:42 +0000 (03:20 +0000)]
namequery.c: Fixed SGI IRIX 5.x compiler problem.
server.c: Added MACHINE.SID file generation - use lp_domain_sid() be default.
smbpass.c: Exposed do_file_lock() as I now use it in server.c
Jeremy.
(This used to be commit 5bf17840ac7d65d08dd3fdfe8b789010488f6808)

23 years agochgpasswd.c: Added comments to #ifdefs
Jeremy Allison [Thu, 14 May 1998 01:30:40 +0000 (01:30 +0000)]
chgpasswd.c: Added comments to #ifdefs
ipc.c: Caused samba password changing not to be done if UNIX password
       changing requested and not successful.
util.c: Added string_to_sid() and sid_to_string() functions.
lib/rpc/client/cli_samr.c:
lib/rpc/include/rpc_misc.h:
lib/rpc/parse/parse_lsa.c:
lib/rpc/parse/parse_misc.c:
lib/rpc/parse/parse_net.c:
lib/rpc/parse/parse_samr.c:
lib/rpc/server/srv_lsa.c:
lib/rpc/server/srv_lsa_hnd.c:
lib/rpc/server/srv_netlog.c:
lib/rpc/server/srv_samr.c:
lib/rpc/server/srv_util.c: Changes so that instead of passing SIDs
around as char *, they are converted to DOM_SID at the earliest
opportunity, and passed around as that. Also added dynamic memory
allocation of group sids. Preparing to auto-generate machine sid.
Jeremy.
(This used to be commit 134d6fa79c1b6b9505a2c84ba9bfb91dd3be76e5)

23 years agoFixed up HPUX entry.
Jeremy Allison [Wed, 13 May 1998 18:36:12 +0000 (18:36 +0000)]
Fixed up HPUX entry.
Jeremy.
(This used to be commit a7afda2e4ecab226c90db023293f5d460e81ae2f)

23 years agoinitialise some variables (stops warning)
Andrew Tridgell [Wed, 13 May 1998 05:07:55 +0000 (05:07 +0000)]
initialise some variables (stops warning)
(This used to be commit 6074d09dbf7c9ae03a56773e6ff0a52a60cc75da)

23 years agotest for overflow in nmb name parsing code
Andrew Tridgell [Wed, 13 May 1998 05:03:17 +0000 (05:03 +0000)]
test for overflow in nmb name parsing code
(This used to be commit 204a939807d6fe66fcd721aabf7a88ee33eb23d6)

23 years agoinitialise a variable
Andrew Tridgell [Wed, 13 May 1998 05:02:31 +0000 (05:02 +0000)]
initialise a variable
(This used to be commit 1c052f8744c3f1f64638eb4c0ea7b0db39d50040)

23 years agowe don't need a typedef for string
Andrew Tridgell [Wed, 13 May 1998 05:01:36 +0000 (05:01 +0000)]
we don't need a typedef for string
(This used to be commit 9907296225e35548dadd70e1be5a06517b27bb87)

23 years agoincludes.h: SunOS doesn't have strcasecmp, solaris versions prior to 2.6 don't
Jeremy Allison [Tue, 12 May 1998 22:11:24 +0000 (22:11 +0000)]
includes.h: SunOS doesn't have strcasecmp, solaris versions prior to 2.6 don't
            have vsnprintf.
locking_slow.c: slight tidy.
make_smbcodepage.c: Use safe_strcpy instead of pstrcpy.
nmbd_winsserver.c: Use pstrcpy instead of fstrcpy.
smbmount.c: Fixed reported bug.
util.c: Removed old fstrcpy/fstrcat functions.
Jeremy.
(This used to be commit f257d2e4bafd3944cca737699913a8d868279ca6)

23 years ago- removed ldap_get_trust()
Luke Leighton [Tue, 12 May 1998 16:49:26 +0000 (16:49 +0000)]
- removed ldap_get_trust()

- #ifdef around putting 16 byte hashes instead of plaintext password.
(This used to be commit ca7bf597e4781ee1a82dc231584b16624d99e9f3)

23 years agofunction comments wrong
Luke Leighton [Tue, 12 May 1998 16:43:52 +0000 (16:43 +0000)]
function comments wrong
(This used to be commit da11063cbd23c376c4e1afaad647adcb989934eb)

23 years agoremoved lp_domain_workstation() parameter
Luke Leighton [Tue, 12 May 1998 14:04:46 +0000 (14:04 +0000)]
removed lp_domain_workstation() parameter
(This used to be commit 80d6a3bb0cf3853aa51594cce888e6c0a6e6f634)

23 years agoretired this file: it's not actually needed now that passdb.c provides
Luke Leighton [Tue, 12 May 1998 14:01:56 +0000 (14:01 +0000)]
retired this file: it's not actually needed now that passdb.c provides
the interface point.
(This used to be commit 27ba6fafc90d8de7107f39c848f1f34b021ed0a0)

23 years agoa new slprintf() function. This one is totally portable but a bit of a
Andrew Tridgell [Tue, 12 May 1998 12:48:54 +0000 (12:48 +0000)]
a new slprintf() function. This one is totally portable but a bit of a
kludge. It is a safe kludge with our current code but I would like to
revisit it at some point in the future.

The problem with the one I committed yesterday is it used non-portable
functions. (it also had a bug in it, but that's another matter)

This one works by just using vsprintf() into a 8k buffer and a memcpy
from there. No memory protection tricks or other non-portable
stuff. This is safe because all calls to slprintf() in samba use
strings which have been through a pstrcpy and thus are less than 1024
bytes. No call uses more than 2 of these strings. See what I mean by
kludge? Note that the 8k is way overkill but I like overkill :)

Someday (after autoconf) we will replace this with something better,
but meanwhile this is simple, secure and portable.
(This used to be commit 4cfcc398c35c6726f14f485ae8e9ebcef180392f)

23 years agoThis is a security audit change of the main source.
Jeremy Allison [Tue, 12 May 1998 00:55:32 +0000 (00:55 +0000)]
This is a security audit change of the main source.
It removed all ocurrences of the following functions :

sprintf
strcpy
strcat

The replacements are slprintf, safe_strcpy and safe_strcat.

It should not be possible to use code in Samba that uses
sprintf, strcpy or strcat, only the safe_equivalents.

Once Andrew has fixed the slprintf implementation then
this code will be moved back to the 1.9.18 code stream.

Jeremy.
(This used to be commit 2d774454005f0b54e5684cf618da7060594dfcbb)

23 years agopassword back-end database support
Luke Leighton [Mon, 11 May 1998 18:03:01 +0000 (18:03 +0000)]
password back-end database support

ldap.c :

- added getldap21pwent() function

passdb.c :

- getsam21pwent() no longer a stub: calls ldap21 or smb21

smbpass.c :

- added getsmb21pwent() function (he he :-)

lib/rpc/server/srv_samr.c :

- removed "specific" calls to ldap functions; replaced with
  call to get_sampwd_entries instead (which is unfinished).

- rewrote get_user_info_21 function to call getsam21pwrid.
(This used to be commit c760ebbf127796427c4602aae61952df938c6def)

23 years agoreply.c: Added code to not overwrite sesssetup_user when in share level security
Jeremy Allison [Mon, 11 May 1998 17:53:37 +0000 (17:53 +0000)]
reply.c: Added code to not overwrite sesssetup_user when in share level security
and null session setup done.
smbpasswd.c: Fix from Gerald Carter <cartegw@Eng.Auburn.EDU> to fix incorrect
             use of pointer.
Jeremy.
(This used to be commit 69ace0760986a6e892cd5b25ca85930b65e38c45)

23 years agoadd lp_domain_workstations() parameter. this is a list of workstation names
Luke Leighton [Mon, 11 May 1998 17:34:39 +0000 (17:34 +0000)]
add lp_domain_workstations() parameter.  this is a list of workstation names
from which an NT user can log in from.  empty (default) indicates no
restrictions.  exactly how this is enforced is unknown.  from past experience
it's likely that the enforcement is left to the client to carry out...
(This used to be commit 6b2f9ea68f5754ca6caaf685a9538ab404e1bab4)

23 years agoldap back-end database development
Luke Leighton [Mon, 11 May 1998 15:56:01 +0000 (15:56 +0000)]
ldap back-end database development

Makefile:

created PASSBD_OBJ group

includes.h:

added #ifdef USE_LDAP to #include <ldap> headers

ldap.c:

- renamed "_machine" to "_trust" everywhere.
- added sam_passwd support routines
- removed get_ldappwd_entry function: replaced with get_sampwd_entry
- removed getldappwnam/uid: replaced with getsampwnam/uid
- other messing about bits which are probably going to annoy the
  hell out of jean-francois (sorry!)

mkproto.awk:

- added stuff to wrap ldap.c protos with #ifdef USE_LDAP
- added uid_t and gid_t return results to the prototype generation

passdb.c:

- created getsam21pwent, add_sam21pwd_entry, mod_sam21pwd_entry.
- modified getsampwnam/uid and created getsam21pwnam/rid functions
  to replace the local get_smbpwd_entry() and get_ldappwd_entry()
  functions, which jeremy didn't like anyway because they were
  dual-purpose.
- added utility routines which are or may be useful to all the
  password database routines.

password.c:

- renamed "machine_" to "trust_" everywhere.

smbpass.c:

- removed get_smbpwd_entry function: replaced it with get_sampwd_entry
  functions in passdb.c
- moved code that decoded acct_ctrl into passdb.c
- moved encode_acct_ctrl into passdb.c
- removed getsmbpwnam/uid: replaced with getsampwnam/uid
- renamed "machine_" to "trust_" everywhere.

smbpasswd.c:

- renamed "machine_" to "trust_" everywhere.

util.c:

- moved gethexpwd function into passdb.c

lib/rpc/server/srv_util.c:

- moved user_rid_to_uid, group_rid_to_rid etc etc into passdb.c
(This used to be commit 673ab50c4c2c25db355d90efde3a6bfbb4d8369e)

23 years agodon't use system functions as arguments to qsort() as otherwise you
Andrew Tridgell [Mon, 11 May 1998 08:41:09 +0000 (08:41 +0000)]
don't use system functions as arguments to qsort() as otherwise you
get stuck on systems with broken headers (like SunOS4). In this case
use StrCaseCmp instead of strcasecmp
(This used to be commit 1386c6e25a2cf05c5c48b7a5094db3b2a6f5a5b3)

23 years agoinclude includes.h in all the ubiqx files. I know Chris won't like
Andrew Tridgell [Mon, 11 May 1998 08:32:37 +0000 (08:32 +0000)]
include includes.h in all the ubiqx files. I know Chris won't like
this but it really is necessary (sorry Chris!)

ubiqx code didn't compile on SunOS4 otherwise as stdlib didn't define
NULL.
(This used to be commit 4989db8b0b6fad8bd743615b1fe177adbb2594cf)

23 years agochanged to use slprintf() instead of sprintf() just about
Andrew Tridgell [Mon, 11 May 1998 06:38:36 +0000 (06:38 +0000)]
changed to use slprintf() instead of sprintf() just about
everywhere. I've implemented slprintf() as a bounds checked sprintf()
using mprotect() and a non-writeable page.

This should prevent any sprintf based security holes.
(This used to be commit ee09e9dadb69aaba5a751dd20ccc6d587d841bd6)

23 years agochanged to use slprintf() instead of sprintf() just about
Andrew Tridgell [Mon, 11 May 1998 06:35:45 +0000 (06:35 +0000)]
changed to use slprintf() instead of sprintf() just about
everywhere. I've implemented slprintf() as a bounds checked sprintf()
using mprotect() and a non-writeable page.

This should prevent any sprintf based security holes.
(This used to be commit 6b0c1733d2ebf3b8f09f3bf88b8648d8b371bb1f)

23 years agoUpdated OSF1_ENH_SEC mode password handling.
John Terpstra [Sun, 10 May 1998 06:20:27 +0000 (06:20 +0000)]
Updated OSF1_ENH_SEC mode password handling.
This now tries Enhanced passwords first and if this fails trys Basic
mode (ie: Unix /etc/passwd) authentication. This only happens when
OSF1_ENH_SEC is defined at compilation.
(This used to be commit 29462c8d7a241eb462b1583170a0b5f16096ea3f)

23 years agoadded sam_passwd structure: don't want smb_passwd to be "polluted".
Luke Leighton [Fri, 8 May 1998 17:53:17 +0000 (17:53 +0000)]
added sam_passwd structure: don't want smb_passwd to be "polluted".
(This used to be commit d42dd371fa2ab690bf4261a735f03a7380479ebe)

23 years agomove things around to get rid of make clean warning messages
Herb Lewis [Fri, 8 May 1998 17:30:48 +0000 (17:30 +0000)]
move things around to get rid of make clean warning messages
(This used to be commit d7975ef1e3f38e678ea20d3f86718b05f4fb1aff)

23 years agoremoved proto.h from cvsignore
Luke Leighton [Fri, 8 May 1998 17:01:25 +0000 (17:01 +0000)]
removed proto.h from cvsignore
(This used to be commit beb56f083d6f9c557486f08b8266c53552684118)

23 years agoclitar.c: #ifdef'ed out all the bits that were giving 'defined but not used'
Jeremy Allison [Fri, 8 May 1998 16:59:30 +0000 (16:59 +0000)]
clitar.c: #ifdef'ed out all the bits that were giving 'defined but not used'
          messages.
nttrans.c: More updates.
smb.h: Removed stuff that didn't belong in the smb_passwd struct. Persuaded Luke
       to use a new structure.
web/swat.c: Fixed gcc complaints about shadowing global 'string'.
Jeremy.
(This used to be commit 61c1dbb9785ed1e6fe40f93c7cc65024884df6f5)

23 years agoHo hum, someone deleted proto.h from cvs... re-adding.
Jeremy Allison [Fri, 8 May 1998 16:49:10 +0000 (16:49 +0000)]
Ho hum, someone deleted proto.h from cvs... re-adding.
Jeremy.
(This used to be commit 6dde50738fcdbaae799101b84ab6b6270696193d)

23 years agoproto.h was being a pain. use "make proto" instead. check release and
Luke Leighton [Fri, 8 May 1998 14:41:35 +0000 (14:41 +0000)]
proto.h was being a pain.  use "make proto" instead.  check release and
release-alpha scripts operate correctly when it comes to generating
a release or alpha release.
(This used to be commit 6f792502d714c4883fe0831068c4ac703e7029ba)

23 years agoadded proto.h to .cvsignore
Luke Leighton [Fri, 8 May 1998 14:14:26 +0000 (14:14 +0000)]
added proto.h to .cvsignore
(This used to be commit 29eda8a00ad0d1036a14e2b1e30c7aeca846bbb2)

23 years agoadded smb_grpid to smb_passwd struct
Luke Leighton [Fri, 8 May 1998 14:09:13 +0000 (14:09 +0000)]
added smb_grpid to smb_passwd struct
(This used to be commit bcafdcda85581cee4b7b5ead4526c30851e461bf)

23 years agoSe-submitting clitar.c/
Richard Sharpe [Fri, 8 May 1998 13:51:17 +0000 (13:51 +0000)]
Se-submitting clitar.c/

I now only have one warning in my code which is the result of some code I have started
working on but am not yet using in the code, along with a warning that is caused
by one of the include files (a nested comment).

I used -Wall -Wshadow -Wstrict-prototypes
(This used to be commit 7b98fd5b69282320af700833c2d2720c42a382d8)

23 years agorenamed last_change_time to pass_must_change_time. removed "if (bool==True)"
Luke Leighton [Fri, 8 May 1998 11:31:55 +0000 (11:31 +0000)]
renamed last_change_time to pass_must_change_time.  removed "if (bool==True)"
and "if (bool==False)" code from ldap.c - a boolean test may not necessarily
return exactly True or exactly False: True may be defined to be -1: you never
know...
(This used to be commit 9bf9752134a92b9a6e8895300d986cfa23547c03)

23 years agoadded extra fields to struct smb_passwd
Luke Leighton [Fri, 8 May 1998 11:30:17 +0000 (11:30 +0000)]
added extra fields to struct smb_passwd

the smbpw functions are expected to fill in the blanks by reading the
appropriate smb.conf parameters.

the ldappw functions are expected to fill in the fields from the ldap
database.  a separate utility can be written to fill in the ldap database
fields from the smb.conf parameters, at a later date.
(This used to be commit 0b6394c83ec20afdd8065da6785e057c35f3951f)

23 years agoThe globals section now shows non-default variables (like the
Herb Lewis [Fri, 8 May 1998 01:45:12 +0000 (01:45 +0000)]
The globals section now shows non-default variables (like the
view config section does) in the basic view. There is also a
reset button to undo all changes you have made (that haven't
been committed). In addition each field now has a "Set Default"
button. Multi-choice fields are now select fields instead of
a set of radio buttons.

On the status screen I added a "restart" option for stopping then
starting smbd and nmbd.
(This used to be commit a6edde4f004d3ba65d938acd3e6e094664a6c468)

23 years agoadded FLAG_BASIC to some browse options for swat.
Herb Lewis [Fri, 8 May 1998 01:41:27 +0000 (01:41 +0000)]
added FLAG_BASIC to some browse options for swat.
(This used to be commit ce1af10ab44d5d16557ddfd28c58f1669c04e0b3)

23 years agosmb.h: Supporting defines for NT trans calls.
Jeremy Allison [Fri, 8 May 1998 01:23:11 +0000 (01:23 +0000)]
smb.h: Supporting defines for NT trans calls.
trans2.c: Paranoia bugfixes added when studying nttrans.c.
Jeremy.
(This used to be commit 94e70edef91c71703a7ebcdaf2b5a2bdce940a69)

23 years agoInitial cut at the code that will do NT SMB calls. Not linked in, not
Jeremy Allison [Fri, 8 May 1998 01:22:16 +0000 (01:22 +0000)]
Initial cut at the code that will do NT SMB calls. Not linked in, not
compiled yet, just checked in for safe keeping :-).
Jeremy.
(This used to be commit 74565f0039be8ab02a501accad5e671e80733314)

23 years agoadded first pass at start/get/end-ldappwent functions. unfortunately, lots
Luke Leighton [Thu, 7 May 1998 21:09:58 +0000 (21:09 +0000)]
added first pass at start/get/end-ldappwent functions.  unfortunately, lots
of information will be lost as these functions currently return
struct smb_passwd not SAM_USER_INFO_21 or any other type of structure...
(This used to be commit ad3097099cba524c9ec7c3ffc6d5647019efeaab)

23 years agoremove unused ldap functions: add stub start/get/endldappwent routines.
Luke Leighton [Thu, 7 May 1998 20:44:45 +0000 (20:44 +0000)]
remove unused ldap functions: add stub start/get/endldappwent routines.
(This used to be commit a827412effe75029622cc3c822b1d581dd374fda)

23 years agomoving gethexpwd into util.c, because it's used in both smbpass.c and ldap.c
Luke Leighton [Thu, 7 May 1998 19:59:32 +0000 (19:59 +0000)]
moving gethexpwd into util.c, because it's used in both smbpass.c and ldap.c
(This used to be commit abe261b2f5ea7036e7be6230876176d134ef4ee4)

23 years agoThis should (hopefully :-) be the final fix for the %U %G substitution
Jeremy Allison [Thu, 7 May 1998 19:04:14 +0000 (19:04 +0000)]
This should (hopefully :-) be the final fix for the %U %G substitution
problem....
smbpass.c: Removed Luke's dire warning - as some of the functions in here
*need* to be called externally :-).
Jeremy.
(This used to be commit 1fd8d12ca414066acec71b33eb8a13e16c2acd3a)

23 years agocreated "passdb.c" which is an interface point to (at present) either
Luke Leighton [Thu, 7 May 1998 18:19:05 +0000 (18:19 +0000)]
created "passdb.c" which is an interface point to (at present) either
smbpasswd or ldap passwd, at compile-time (-DUSE_LDAP).

_none_ of the functions in ldap.c or smbpass.c should be called directly:
only those in passdb.c should be used.

-DUSE_LDAP is unlikely to compile at the moment.
(This used to be commit 57b01ad4ffb14ebd600d4e66602b54ed987f6106)

23 years agoFixed changed calls to machine password locking code.
Jeremy Allison [Thu, 7 May 1998 02:06:53 +0000 (02:06 +0000)]
Fixed changed calls to machine password locking code.
Jeremy.
(This used to be commit dfdc9b0b1e47717b83e54f1cf726e40122cf9baf)

23 years agoAndrew redefines the free() function to do some memory management testing.
Christopher R. Hertel [Wed, 6 May 1998 19:22:45 +0000 (19:22 +0000)]
Andrew redefines the free() function to do some memory management testing.
He also suggested that some systems may implement free() as a macro (but
I think he was looking for an excuse ;).  Anyway, I've added a function
to mangle.c that calls free().
Chris -)-----
(This used to be commit 95f7b03285c42e8f5573690939b79afc7e686908)

23 years agosmbpass.c: Fixed machine_passwd_lock() problems.
Jeremy Allison [Wed, 6 May 1998 18:45:57 +0000 (18:45 +0000)]
smbpass.c: Fixed machine_passwd_lock() problems.
password.c: Fixed machine_passwd_lock() problems.
lib/rpc/server/srv_ldap_helpers.c: Oops - broke proto.h with dummy function. Fixed now.
Jeremy.
(This used to be commit d28427f21fff49da6b38c24625e3e2dae49a9713)

23 years agoloadparm.c: Added #ifdef USE_LDAP around ldap code.
Jeremy Allison [Wed, 6 May 1998 18:14:02 +0000 (18:14 +0000)]
loadparm.c: Added #ifdef USE_LDAP around ldap code.
server.c: Moved %U, %G and %N into standard_sub() from standard_sub_basic()
          as only smbd knows about usernames. Also fixes problem with calling
          standard_sub_basic() from loadparm.c.
smbpass.c: Partial tidyup of machine_password_lock() code - not finished yet.
util.c: Moved %U, %G and %N into standard_sub() from standard_sub_basic()
          as only smbd knows about usernames. Also fixes problem with calling
          standard_sub_basic() from loadparm.c.
lib/rpc/server/srv_ldap_helpers.c: Added #ifdef USE_LDAP around ldap code.
lib/rpc/server/srv_samr.c: Added #ifdef USE_LDAP around ldap code.
Jeremy.
(This used to be commit 446b98ca071170fc950bad86ad96b58308a5b75c)

23 years agoRolling back again to the equivalent of revision 1.22, as the current
Jeremy Allison [Wed, 6 May 1998 17:54:28 +0000 (17:54 +0000)]
Rolling back again to the equivalent of revision 1.22, as the current
CVS head branch will not compile.
Jeremy.
(This used to be commit 18a0a10dcb04733a2d7ba0e16d07ab7e6e2d54be)

23 years agojean-francois micouleau's well-alpha code for ldap password database stuff!
Luke Leighton [Wed, 6 May 1998 17:43:44 +0000 (17:43 +0000)]
jean-francois micouleau's well-alpha code for ldap password database stuff!
he's going to hate me for checking this in so early, but...
(This used to be commit ad9ba0a1cbac5c4e6cbcbcadefe8f1df72231f74)

23 years agoAdded mksmbpasswd.sh to binary package
Volker Lendecke [Wed, 6 May 1998 16:13:31 +0000 (16:13 +0000)]
Added mksmbpasswd.sh to binary package
(This used to be commit 94f31b95f708a4362fdcc697610d6edc9b72a5fc)

23 years agocompiler warning for unimportant uninitialised variable
Luke Leighton [Wed, 6 May 1998 12:11:35 +0000 (12:11 +0000)]
compiler warning for unimportant uninitialised variable
(This used to be commit 81bf26309248b63cc7e167170a8b384c11126ded)

23 years agoReal fix for clitar.c problems. Have now made all the right
Richard Sharpe [Wed, 6 May 1998 02:35:56 +0000 (02:35 +0000)]
Real fix for clitar.c problems. Have now made all the right
things static, and have done a 'make proto; make clean; make'.

Still get 54 compiler warnings under Digital UNIX cc.

Honest. :-)
(This used to be commit 47eb7e5be2f12206bd2de0670be478d80e1d84de)

23 years agomuch faster pstrcpy() and fstrcpy()
Andrew Tridgell [Wed, 6 May 1998 02:30:52 +0000 (02:30 +0000)]
much faster pstrcpy() and fstrcpy()

also print out the first 50 chars of an overflowing string so we have
some chance of working out what is causng them.
(This used to be commit 7a67e76722521ac8099cbcda054b0f4bf45c7bfe)