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

387 Commits

Author SHA1 Message Date
Luke Leighton
eadc5b8c6e domain aliases added a bit better: does local aliases if you query
for sid S-1-5-20 and does (nothing at the moment) if you query for
your own sid.
(This used to be commit da40f26f4b)
1998-10-21 22:36:26 +00:00
Luke Leighton
21e107fd42 the next dialog: user-groups. it's not very sensible what appears, but hey:
it appears!
(This used to be commit 399035098f)
1998-10-21 21:11:16 +00:00
Jeremy Allison
d60168c4f9 Fixed warning in get_time_from_string().
Jeremy.
(This used to be commit e9b7ff0dec)
1998-09-29 20:36:18 +00:00
Luke Leighton
282eb4f3e8 missed the pdb_sam_to_smb function needed by nispass.c
(This used to be commit b40a4e6385)
1998-09-29 17:59:16 +00:00
Luke Leighton
c62031c300 added in some pdb_xxx routines that are needed by nispass.c
(This used to be commit 5212dd69d0)
1998-09-29 17:56:12 +00:00
Jeremy Allison
5f7ee36056 Makefile.in: Fixed bug with continuation line causing proto to fail.
Added $(PROGS) $(SPROGS) as targets for make clean.
acconfig.h: Added HAVE_IRIX_SPECIFIC_CAPABILITIES.
configure.in: Added sys/capability.h header check.
              Added function checks for srandom random srand rand.
              Added HAVE_IRIX_SPECIFIC_CAPABILITIES test.
includes.h: Added #include <sys/capability.h>.
ntdomain.h: Moved struct acct_info into here from smb.h
smb.h: Added KERNEL_OPLOCK_CAPABILITY define.
       Moved enum action_type into rpcclient.h
       Moved struct cli_state into client.h
       Moved struct nt_client_info, struct tar_client_info, struct client_info
             into rpcclient.h
lib/genrand.c: Changed to use sys_random() & friends.
lib/smbrun.c: Lose capabilities after fork.
lib/system.c: Added set_process_capability(), set_inherited_process_capability()
              sys_random(), sys_srandom().
lib/util.c: Added Ander's EFBIG lock check to fcntl_lock for 64 bit access to an
            32 bit mounted NFS filesystem.
nmbd/nmbd.c: Changed to use sys_random() & friends.
nmbd/nmbd_browsesync.c: Changed to use sys_random() & friends.
passdb/ldap.c: Missed one pdb_encode_acct_ctrl call.
passdb/passdb.c: Changed to Ander's code for ' ' characters.
passdb/smbpass.c: Added Ander's code to reset ACB_PWNOTREQ.
script/mkproto.awk: Added 'long' to prototypes.
smbd/chgpasswd.c: Lose capabilities after fork.
smbd/open.c: Do the mmap *after* the kernel oplock.
smbd/oplock.c: Removed stub code from kernel oplock path.
               Added set_process_capability(), set_inherited_process_capability() calls.
smbd/reply.c: Initialize count = 0, offset = 0.
smbd/server.c: Added set_process_capability(), set_inherited_process_capability() calls.
tests/summary.c: Ensure we have RANDOM or RAND.
utils/smbpasswd.c: Added Ander's code to reset ACB_PWNOTREQ.
utils/torture.c: Changed to use sys_random() & friends.

Jeremy.
(This used to be commit e8be306f23)
1998-09-25 23:40:49 +00:00
Jeremy Allison
dc36d8768a Integration of Anders Blomdell <anders.blomdell@control.lth.se>'s
smbpasswd changes. Not exactly the same as his code - several
changes.
Jeremy.
(This used to be commit e96747a8e3)
1998-09-24 22:33:13 +00:00
Luke Leighton
50beafdf22 removed function names printed out in debug statements (duplicated in
DEBUG macro, automatically)
(This used to be commit 2e4d681d17)
1998-09-24 19:57:02 +00:00
Andrew Tridgell
e9ea36e4d2 tridge the destroyer returns!
prompted by the interpret_security() dead code that Jean-Francois
pointed out I added a make target "finddead" that finds potentially
dead (ie. unused) code. It spat out 304 function names ...

I went through these are deleted many of them, making others static
(finddead also reports functions that are used only in the local
file).

in doing this I have almost certainly deleted some useful code. I may
have even prevented compilation with some compile options. I
apologise. I decided it was better to get rid of this code now and add
back the one or two functions that are needed than to keep all this
baggage.

So, if I have done a bit too much "destroying" then let me know. Keep
the swearing to a minimum :)

One bit I didn't do is the ubibt code. Chris, can you look at that?
Heaps of unused functions there. Can they be made static?
(This used to be commit 2204475c87)
1998-09-05 05:07:05 +00:00
Jeremy Allison
7bb86c1b13 Ok - this is the 64 bit widening check in. It changes the configure
to check for stat64 and friends, and then changes much of Samba
to use the data type SMB_OFF_T for file size information.

stat/fstat/lstat/lseek/ftruncate have now become sys_stat etc. to hide
the 64 bit calls if needed.

Note that this still does not expose 64 bit functionality to the
client, as the changes to the reply_xxx smb's are not yet done.

This code change should make these changes possible.

Still to do before full 64 bit-ness to the client:

fcntl lock code.
statfs code
widening of dev_t and ino_t (now possible due to SMB_DEV_T and SMB_OFF_T
types being in place).

Let me know if wierd things happen after this check-in and I'll
fix them :-).

Jeremy.
(This used to be commit 14500936c3)
1998-09-03 18:40:31 +00:00
Jeremy Allison
1855627413 More abstraction of file system data types, to move to a 64
bit file interface for the NT SMB's.

Created a new define, SMB_STRUCT_STAT that currently is
defined to be struct stat - this wil change to a user
defined type containing 64 bit info when the correct
wrappers are written for 64 bit stat(), fstat() and lstat()
calls.

Also changed all sys_xxxx() calls that were previously just
wrappers to the same call prefixed by a dos_to_unix() call
into dos_xxxx() calls. This makes it explicit when a pathname
translation is being done, and when it is not.

Now, all sys_xxx() calls are meant to be wrappers to mask
OS differences, and not silently converting filenames on
the fly.

Jeremy.
(This used to be commit 28aa182dbf)
1998-09-01 20:11:54 +00:00
Jeremy Allison
e13aeea928 configure: Changes for extra headers.
configure.in: Source for header changes.
client/clitar.c: Fixed isXXX macros & debugs for gcc pedantic compile.
include/config.h.in: Added MEMSET, BZERO, MEMORY, RPCSVC_YPCLNT, STRINGS headers.
include/includes.h: Headers for the above.
include/smb.h: Made SIGNAL_CAST POSIX by default void (*)(int).
lib/access.c: Fixed isXXX macros & debugs for gcc pedantic compile.
lib/charset.c: Fixed isXXX macros & debugs for gcc pedantic compile.
lib/debug.c: Fixed signal functs.
lib/kanji.c: Fixed isXXX macros & debugs for gcc pedantic compile.
lib/smbrun.c: Fixed isXXX macros & debugs for gcc pedantic compile.
lib/util.c: Fixed isXXX macros & debugs for gcc pedantic compile.
libsmb/namequery.c: Fixed isXXX macros & debugs for gcc pedantic compile.
locking/shmem.c: Fixed isXXX macros & debugs for gcc pedantic compile.
locking/shmem_sysv.c: Fixed error messages in sysV stuff.
nmbd/asyncdns.c: Fixed signal functs.
nmbd/nmbd.c: Fixed isXXX macros & debugs for gcc pedantic compile.
passdb/passdb.c: Fixed isXXX macros & debugs for gcc pedantic compile.
passdb/smbpassfile.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/chgpasswd.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/ipc.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/nttrans.c: Fixed fsp code path.
smbd/password.c: fixed HAVE_YP_GET_DEFAULT_DOMAIN problem.
smbd/printing.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/reply.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/server.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/trans2.c: Fixed core dump bug.
smbd/uid.c: Fixed isXXX macros & debugs for gcc pedantic compile.
Jeremy.
(This used to be commit 1b9cbcd02e)
1998-08-15 01:19:26 +00:00
Andrew Tridgell
64578c0589 merge from the autoconf2 branch to the main branch
(This used to be commit 3bda7ac417)
1998-07-29 03:08:05 +00:00
Jeremy Allison
55da32fb45 clitar.c: Fixed minor gcc -pedantic-error compile warnings.
passdb.c: Fixed stupid bug in read_sid_from_file().
Jeremy.
(This used to be commit e65efe3f78)
1998-06-20 10:06:26 +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 34f40474ab)
1998-06-01 18:50:27 +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 b8fedca619)
1998-05-27 00:30:52 +00:00
Luke Leighton
863c787b02 added set logon, logoff, kickoff etc time functions.
(This used to be commit dab9728a43)
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 d553901b9a)
1998-05-25 13:24:36 +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 bd825f1ef1)
1998-05-24 13:36:43 +00:00
Luke Leighton
cf76b415a3 fixed signed / unsigned warnings spotted by tim winders. also fixed
unnecessary "address of" warnings.
(This used to be commit ed0afe1e18)
1998-05-21 12:18:52 +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 cd244b45a5)
1998-05-19 20:08:37 +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 d906ac5941)
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 0193dd21c3)
1998-05-19 17:48: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 27ca536ad9)
1998-05-18 23:57:28 +00:00
Jeremy Allison
ffab54750f 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 7d332b2493)
1998-05-18 21:30:57 +00:00
Luke Leighton
29644e4b35 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 e325d9a810)
1998-05-18 17:15:21 +00:00
Luke Leighton
b40d52d640 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 2253ca4072)
1998-05-18 17:10:57 +00:00
Luke Leighton
cffaf886da 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 d92f4e71c1)
1998-05-18 15:50:56 +00:00
Luke Leighton
4d63fdc430 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 98ab085b93)
1998-05-18 14:55:17 +00:00
Luke Leighton
c7890d44c7 no include headers in ldap.c.
passdb.c sam_passwd <-> smb_passwd conversion routines
(This used to be commit 8082239c81)
1998-05-18 14:43:06 +00:00
Luke Leighton
39f3c0c25a - 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 3e48b4eb11)
1998-05-18 12:27:04 +00:00
Luke Leighton
32954eb9e9 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 f215d375f0)
1998-05-18 11:54:00 +00:00
Luke Leighton
c230ee1ef6 some databases have search capabilities. acknowledging this in design
of passdb.c api.
(This used to be commit 2dd01b7c70)
1998-05-15 14:50:35 +00:00
Jeremy Allison
f8a4273407 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 3b8f5aef57)
1998-05-14 21:10:49 +00:00
Luke Leighton
9141acecdc 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 c760ebbf12)
1998-05-11 18:03:01 +00:00
Luke Leighton
f004d84f68 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 673ab50c4c)
1998-05-11 15:56:01 +00:00
Luke Leighton
d8d9f77233 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 57b01ad4ff)
1998-05-07 18:19:05 +00:00