1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-17 02:05:21 +03:00

1476 Commits

Author SHA1 Message Date
Luke Leighton
1b85da9a1c had what would be a compile error if it wasn't #if 0'd out in passdb_ops
(This used to be commit 2cb94eec59bdcc1272063637bbc8b7a5449fdc62)
1998-06-04 17:48:21 +00:00
Luke Leighton
59e2992139 added "domain admin group" and "domain guest group" parameters. this is
because "domain admin users" and "domain guest users" was overloaded.

incorrectly.
(This used to be commit 04b824007263ac4879c7282a2d230deaac7d2c7b)
1998-06-04 15:24:20 +00:00
Jeremy Allison
206f5882e7 Fixed file descriptor leak in open_socket_out - this could
cause nmbd to run out of fd's. Test case found by Eloy Paris.
Jeremy.
(This used to be commit 9e2570317138cc6a7ffdc603564f863ff20139b8)
1998-06-04 01:50:28 +00:00
Jeremy Allison
a1c66b009f includes.h: Fixes for NetBSD and BSDI.
smbpass.c: Fixed irix warnings.
Jeremy.
(This used to be commit 2caefb35ff56dba67968d04755d74238a38ba29d)
1998-06-04 00:49:32 +00:00
Christopher R. Hertel
52c69766ea It occurred to me that the samba includes.h file should be included in the
header files used by the ubiqx modules, instead of being hidden in the .c
files.  This would ensure that anything in includes.h would be "seen" by
the ubiqx headers.  I also had to put an #ifdef around the includes for
ubi_SplayTree.h and ubi_Cache.h in includes.h to prevent the header of the
descendant type from being included before its parent type.

Chris -)-----
(This used to be commit e30a7e023b7491c01e052ae3dbd1788f84075413)
1998-06-03 21:38:51 +00:00
Jeremy Allison
c435955b02 ipc.c: Fix bug where we don't return the correct error code when client
gives a too-small buffer for share info. Fix from Gil Kloepfer <gil@arlut.utexas.edu>
smb.h:
server.c: Fix for a nastly little security problem with multi-user Windows NT
          servers and Samba where the contents of the open-file cache can end
          up being served out to users who shouldn't have access. This is some
          *seriously* ugly code.
Jeremy.
(This used to be commit 05c85df3c7da982085615e5a1db6c71e164db4f5)
1998-06-03 01:04:45 +00:00
Christopher R. Hertel
1714adc798 Changed the mechanism for including the Samba includes.h in the ubiqx code
to something less hurried, simpler, and (I believe) more acceptable to
all.  The ubi_*.c files all now #include sys_include.h which, for Samba,
contains only comments and the line

#include "../includes.h"

That will make sure that the Samba header is there, allows me to
distribute a different default header with the main ubiqx set, and allows
others to write their own sys_includes.h for their own purposes.

Thanks to Andrew and Jeremy for hammering this out with me.

Chris -)-----
(This used to be commit def161eeea4b430d785ec57150f96fae98a34bcb)
1998-06-02 03:27:16 +00:00
Jeremy Allison
ffe91d6443 clientutil.c: Don't core dump if no controlling terminal available for password.
passdb.c:
lib/rpc/include/rpc_misc.h: First cut at automatic uid/gid to rid mapping.
We can change this at a later date to make more bits available if neccessary.
Jeremy.
(This used to be commit 34f40474aba97118e1e80fe6259c686e46dc16b4)
1998-06-01 18:50:27 +00:00
Andrew Tridgell
3c116d2aa7 point people at the main web site for a up to date list of mirrors
(This used to be commit 553100a2baccc67f1c0e4a1df5b7dc0df9a79c9b)
1998-06-01 06:28:12 +00:00
Paul Blackman
c069bd8eea This change ensures that only the processes/locked files that
belong to -uUsername are printed when running 'smbstatus -uUsername'
PaulB
(This used to be commit da08e486871992043c2650e6aac304cd29ba693c)
1998-05-30 02:25:11 +00:00
Jeremy Allison
3c77f88d45 Added Paul Eggerts LocalTime patch.
Jeremy.
(This used to be commit 6721c28ea6bdb5210836352bb5ffc43d787907fa)
1998-05-29 19:18:43 +00:00
Jeremy Allison
a10b9ab2b9 Adding Greek and Icelandic codepages from :
Manousaridis Haris <genesis@the.forthnet.gr>
and Magns Gslason <magnus@hi.is>

respectively.

Jeremy.
(This used to be commit 583aeaf350ede4ea3e28124b8d66ab0d335656d9)
1998-05-29 18:25:43 +00:00
Luke Leighton
73e93502fe latest messing about: probably doesn't compile; doesn't matter.
(This used to be commit d455d194b7110d4bcbef58134d035bd55702b6f8)
1998-05-28 16:55:12 +00:00
Jeremy Allison
459ecfec83 Ooops - fixed Win95 crash bugs with earlier code.
Jeremy
(This used to be commit 6baeb4ad96bc58cf1bd53f6621067af8344c9556)
1998-05-27 23:50:30 +00:00
Jeremy Allison
ad53f02511 Newly re-written do_match and mask_match functions, with the
help of Ums Harald <Harald.Ums@pro-sieben.de>, who has been
testing our 8.3 wildcards with a test suite.
With his new code for 8.3 matching, this is the test done
(I'm quoting from his email)

"I tested it by generating a directory with about 7600 Files and run
automatc tests with about 4000 patterns. The result from Win95 -> WinNT
and Win95 -> Samba where identical according to diff."

I have also re-written the long filename wildcard code,
so that doing DIR a*z now matches files :

AAA.BBB.CCCC....ZZZZ

correctly, and other fixes besides.

I sincerely hope I can lay this (horrid) issue to rest
now :-).

Jeremy.
(This used to be commit 94e3f0d9b48c1ac6d9235eb6600aff1c47e024bc)
1998-05-27 22:48:22 +00:00
Luke Leighton
8e914e55c0 removed "domain sid = " parameter instructions
(This used to be commit 3bc0d700d1f2a63a8037370986b1f6111a38894c)
1998-05-27 14:22:52 +00:00
Jeremy Allison
9bd7e1e887 loadparm.c: Added machine password timeout parameter - set to 7 days be default.
password.c: Added code to tell server.c when machine password needs changing.
server.c: Change machine password in idle cycles if it needs it.
smbpassfile.c: Fixed up length calculations for machine password file.
smbpasswd.c: Moved domain joining code/machine password changing code.
lib/rpc/client/cli_netlogon.c: And this is where it now lives.
Jeremy.
(This used to be commit b8fedca6191de96159df0d1d17082d82e8e44773)
1998-05-27 00:30:52 +00:00
Jeremy Allison
1d16f75051 smb.h: More NT SMB stuff (just defines).
smbpass.c: Do *NOT* make this function static. It breaks the compile on gcc
util.c: Getting closer to MS wildcard semantics. A trailing '*' matches
        any trailing dot-separated components.
trans2.c: Removed hacks that change multiple '?' -> '*' as this
          breaks things now.
trans2.h: Removed NT_FILE_ATTRIBUTE_NORMAL - now FILE_ATTRIBUTE_NORMAL is defined
          in smb.h.
Jeremy.
(This used to be commit 42a65511068cd9006350c80bbed2f346f3f01cb0)
1998-05-26 19:37:31 +00:00
Luke Leighton
863c787b02 added set logon, logoff, kickoff etc time functions.
(This used to be commit dab9728a4376cc52d6e53b09b5f42d08712330d6)
1998-05-25 13:39:08 +00:00
Luke Leighton
ef46e64510 i wondered why nisppass.c came up with a linker error "pdb_set_last_set_time"
not found.  this gave me a clue...

#if 0 /* commented out until someone uses them jra */

...

#endif
(This used to be commit d553901b9a21c4917058fc6838aaf73eb9a1c8cc)
1998-05-25 13:24:36 +00:00
Luke Leighton
6a19bf582f more warnings, from Tim Winders
(This used to be commit eb157d6da4719b415a1f5202364aa77f2596bc03)
1998-05-24 17:47:49 +00:00
Luke Leighton
684edc9fcd - created pdb_sethexpwd(), to be called from all pwd apis that need to
store passwords in ascii format

- dealt with lots of signed/unsigned char thingies spotted by Tim Winders.
(This used to be commit bd825f1ef15c4bf12aeba945f8bfdc7fd0e14d25)
1998-05-24 13:36:43 +00:00
Jeremy Allison
0f9d24f083 Added more NT definitions, getting ready for nttrans code.
Jeremy.
(This used to be commit 26c0176e104f7345f16f7fdb1115f32e6b0cfcdb)
1998-05-23 02:00:21 +00:00
Luke Leighton
b4b42e7495 add_nisp21pwd_entry() finished but not tested. module now compiles.
(This used to be commit c74d0defcf8e9fca326af190730439f6451f826a)
1998-05-22 12:12:16 +00:00
Luke Leighton
e298045da2 doesn't compile: don't care. checking this in so people can see what's
going on.
(This used to be commit b7ccea8ee190a228cf479f325a2c8578e2bd90ce)
1998-05-22 11:28:32 +00:00
Christopher R. Hertel
cfc43a5a2f I've put the ubiqx headers back into includes.h, and removed them from
dir.c & mangle.c.  This was possible after I checked the tree code to make
sure that the tree code did not reference functions by macro name.  Also,
note that the AVL module has been removed to prevent conflict with the
SplayTree macro defines.

Chris -)-----
(This used to be commit a1f4c8567c3c5264cbfa99867fa894cafab7da81)
1998-05-22 07:46:39 +00:00
Christopher R. Hertel
cf714c364a 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)
1998-05-22 06:32:07 +00:00
Christopher R. Hertel
6580fa6b5c 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)
1998-05-22 05:16:27 +00:00
Christopher R. Hertel
b26d9b8869 Added a disclaimer regarding the changes Andrew wants.
(This used to be commit f8d6aab70a02338c923220459eb12d17fa324e79)
1998-05-22 04:43:04 +00:00
Jeremy Allison
d1d010a995 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)
1998-05-22 01:51:14 +00:00
Andrew Tridgell
a72bb5cb6e 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)
1998-05-22 00:32:27 +00:00
Jeremy Allison
bfa013908f Fixed 'revalidate' parameter so it's only considered in security=share
mode.
Jeremy.
(This used to be commit 7727f09ea9055053ed1d3e2af1069ddae245efb4)
1998-05-21 23:59:04 +00:00
Jeremy Allison
35c65576f7 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)
1998-05-21 23:50:16 +00:00
Christopher R. Hertel
cbb1ef38b5 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)
1998-05-21 17:14:20 +00:00
Luke Leighton
cf76b415a3 fixed signed / unsigned warnings spotted by tim winders. also fixed
unnecessary "address of" warnings.
(This used to be commit ed0afe1e186ce53046e70d8a92103d4f59a2eed2)
1998-05-21 12:18:52 +00:00
Luke Leighton
1defdd0718 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)
1998-05-21 11:54:40 +00:00
Andrew Tridgell
54706f5b44 fix slprintf for sunos4 in head branch
(This used to be commit 4aaf8b6a8bc521e738840fe72708add251eaaccb)
1998-05-20 21:29:32 +00:00
Luke Leighton
9c99863642 dce/rpc net time command from jean-francois. does not support timezones
(This used to be commit 8e11d542eebe076d74ab264e22b87f7aed9bbe8f)
1998-05-20 13:17:26 +00:00
Jeremy Allison
67850c4574 Fixed incorrect last arg to safe_strcpy in new wildcard code.
Jeremy.
(This used to be commit 67007d98b9daf5cccf049cb836dbb989516eb0ce)
1998-05-20 04:20:31 +00:00
Jeremy Allison
fd4d5ab75d Minor tweak for wcard compatibility paranoia.
Jeremy.
(This used to be commit 5d8ef7d0f1ecb358c841f382fc48e6eccbe8e171)
1998-05-20 02:07:57 +00:00
Jeremy Allison
bff8dd86ee 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)
1998-05-20 02:01:21 +00:00
Jeremy Allison
00516da27e Fix to do NT wildcard matching.
Jeremy.
(This used to be commit 170070b9c793805df9f8629e70027f17b949425f)
1998-05-19 22:06:41 +00:00
Jeremy Allison
1b412a501e 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)
1998-05-19 20:08:37 +00:00
Luke Leighton
73231a9e63 made mod_smbfilepwd_entry() and getsmbfilepwent() static. they need not
be exposed.
(This used to be commit 61ab72b82b24006c69b573400f740ff73e742b32)
1998-05-19 19:50:49 +00:00
Luke Leighton
74ea6c06f3 oops - got some of the default (conversion) functions wrong.
(This used to be commit b836581cda2b58d285245f71f2bc419c6ece4911)
1998-05-19 19:41:22 +00:00
Luke Leighton
48c7034c92 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)
1998-05-19 19:17:35 +00:00
Luke Leighton
0a36b8d8a9 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)
1998-05-19 17:48:40 +00:00
Jeremy Allison
643e16be62 Fixed signed/unsigned warning.
Jeremy.
(This used to be commit 6b6539cad8962f2913d892abae811afc72432678)
1998-05-19 04:49:56 +00:00
Jeremy Allison
d9e4b23674 Forgot to add the initialize_password_db() call to nmbd also.
Jeremy.
(This used to be commit 2f9f0a88e8220575edb43a9945d0b60829efa840)
1998-05-19 04:45:40 +00:00
Jeremy Allison
118827376f 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)
1998-05-18 23:57:28 +00:00