samba.git
26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 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)

26 years agoFixes for the %U and %G problems people have reported.
Jeremy Allison [Wed, 6 May 1998 01:34:51 +0000 (01:34 +0000)]
Fixes for the %U and %G problems people have reported.
Essentially, multiple session_setup_and_X's may be done
to an smbd. As there is only one global variable containing
the requested connection name (sessionsetup_user), then any
subsequent sessionsetups overwrite this name (causing %U
and %G to get the wrong name). This is particularly common
when an NT client does a null session setup to get a
browse list after the user has connected, but before
a share has been mounted.

These changes store the requested_name in the vuid structure
(so this only really works for user level and above security)
and copies this name back into the global variable before
the standard_sub call.

Jeremy.
(This used to be commit b5187ad6a3b3af9fbbeee8bced0ab16b41e9825b)

26 years agogenrand.c: SGI compile warning fix.
Jeremy Allison [Tue, 5 May 1998 19:24:32 +0000 (19:24 +0000)]
genrand.c: SGI compile warning fix.
ipc.c: Fix for duplicate printer names being long.
loadparm.c: Set bNetWkstaUserLogon to false by default - new code in password.c
protects us.
nmbd_logonnames.c:
nmbd_namequery.c:
nmbd_namerelease.c: Debug messages fix.
password.c: SGI compile warning fix, fix for tcon() with bNetWkstaUserLogon call.
reply.c: SGI compile warning fix.
server.c Debug messages fix.
smbpass.c: Fix for incorrect pointer.
Jeremy.
(This used to be commit 567d3f838988cafab4770fce1cf68b73085e6c71)

26 years agoadded definitions for "password chat debug" and "unix password sync"
Herb Lewis [Tue, 5 May 1998 19:23:40 +0000 (19:23 +0000)]
added definitions for "password chat debug" and "unix password sync"
from the 1.9.18 tree
(This used to be commit 228a2a0507494e0b13ed5c74488607811da20140)

26 years agoRolling clitar.c back to the previous rev 1.22 as the current one
Jeremy Allison [Tue, 5 May 1998 18:11:24 +0000 (18:11 +0000)]
Rolling clitar.c back to the previous rev 1.22 as the current one
needs fixing (sorry).
Jeremy.
(This used to be commit 50f75b11465ac45f1944ed613a65524ca4e60594)

26 years agoAdded bug fixes to clitar to ensure proper longfile name restores
Richard Sharpe [Tue, 5 May 1998 13:03:44 +0000 (13:03 +0000)]
Added bug fixes to clitar to ensure proper longfile name restores
occur.

Also getting ready for setting directory dates correctly
(This used to be commit fc0cad9035f9cbb5d8a5ee0221c342a3f90cf201)

26 years agopatches from jean francois: couple of minor bugs
Luke Leighton [Tue, 5 May 1998 09:04:49 +0000 (09:04 +0000)]
patches from jean francois: couple of minor bugs
(This used to be commit 532b3956c66eda1b7e787b1c6906bcf574f66216)

26 years agohere is a first cut at a "fixed up" help file
Herb Lewis [Fri, 1 May 1998 19:02:08 +0000 (19:02 +0000)]
here is a first cut at a "fixed up" help file
(This used to be commit 75298937a851573309cad66af9816010ad2bd9a7)

26 years agomkman - add argument for making html versions of man pages
Herb Lewis [Thu, 30 Apr 1998 16:00:18 +0000 (16:00 +0000)]
mkman - add argument for making html versions of man pages
idb.pl - minor fixups for sorting of output file.
(This used to be commit 4657367c5c80867fcd08e9bbe7557bc2ac770504)

26 years agoAdded patch from Bruce Tenison <btenison@dibbs.net> to allow encrypted
Jeremy Allison [Thu, 30 Apr 1998 01:39:22 +0000 (01:39 +0000)]
Added patch from Bruce Tenison <btenison@dibbs.net> to allow encrypted
passwords to be stored over time, allowing a smbpasswd file migration.
Adds new parameter "update encrypted".
Will also add to 1.9.18 branch.
Docs update to follow.
Jeremy.
(This used to be commit 5d3e874d780d595415cc27a7f5945fc2e694c3ac)

26 years agoMakefile: Added files to smbpasswd.c.
Jeremy Allison [Wed, 29 Apr 1998 22:27:26 +0000 (22:27 +0000)]
Makefile: Added files to smbpasswd.c.
loadparm.c: Patch from tim@quiknet.com for static string problems.
server.c: Setup global_myname.
smbpass.c: Fix up locking. Add machine_password_delete() call.
smbpasswd.c: Added provisional code to add to a domain.
lib/rpc/client/cli_login.c: Fixed incorrect cred_hash3 call when setting machine password.
lib/rpc/server/srv_netlog.c: Fixed incorrect cred_hash3 call when setting machine password.
Jeremy.
(This used to be commit 6a7164233e3bf9d6bb57c44a53204068e454ae5c)

26 years agoclientgen.c: Fixed null session setup bug.
Jeremy Allison [Wed, 29 Apr 1998 19:22:01 +0000 (19:22 +0000)]
clientgen.c: Fixed null session setup bug.
password.c: Stopped cli_nt_logout call (we don't have it correct yet).
            Added Luke object-orientation fix :-).
smb.h: Added clnt_name_slash to cli_state.
lib/rpc/client/cli_login.c: Changed global_myname to clnt_name_slash where needed.
lib/rpc/client/cli_netlogon.c: Fixed debug messages, don't check creds on error.
lib/rpc/client/cli_pipe.c: Fixed debug messages, Added Luke object-orientation fix.
lib/rpc/parse/parse_misc.c: Fixed STRING2 linearization bug that was adding 1.
Jeremy.
(This used to be commit c6c22df20196cb7f0ae84b1a1dd202a87adb8d4e)

26 years agoadd clean option
Herb Lewis [Wed, 29 Apr 1998 13:45:27 +0000 (13:45 +0000)]
add clean option
(This used to be commit e21b3a527cc6a3a3b0dee12430bd78d9cc340ae8)

26 years agopassword.c:
Luke Leighton [Wed, 29 Apr 1998 11:00:12 +0000 (11:00 +0000)]
password.c:

added become_root / unbecome_root around the get machine account password.

smbpass.c:

cleaning up code.

- turning if (BOOL_expr == False) into if (BOOL_expr)
  what if you test if (BOOL_expr == True) and someone defines
  True to be -1 on one system and 1 on another?  or if you get
  inconsistent return results between developers

- removed if ((FILE*) == 0) and made this if ((FILE*) == NULL) -
  cannot assume that NULL is zero integer.  plus there are typecast
  issues to deal with

- removed return (ret == 0) ? True : False and made this return ret == 0
  rely on the compiler to return correct BOOL value: not all developers
  will return True or False #defines: stick with BOOL test (non-zero).

- removed if (ret == False) replaced with if (!ret)

- bug where instead of if (sizeof(pstring)-len-len-6 < 0) it had a
  boolean test if (pstring-len-len-6).

- removed "." after debugging of filenames: the "." - a fullstop -
  looked like it was part of the filename, making things difficult
  to sort out.

still to be resolved: the global_myname isn't set up, such that the
machine account password file is named "TEST3..mac".
(This used to be commit 315e26c23abf7137684bf084c825ad241076132e)

26 years agoThis is the checkin that adds the security=domain functionality.
Jeremy Allison [Wed, 29 Apr 1998 00:02:57 +0000 (00:02 +0000)]
This is the checkin that adds the security=domain functionality.

WARNING - so far this has only been tested against a Samba PDC
(still waiting for IS to add me the machine accounts :-).

Still missing is the code in smbpasswd that will add a machine
account password and change it on the domain controller, but
this is not hard, and I will check it in soon.

Jeremy.
(This used to be commit 17b94a7084621b3f0106dd4d3386f05cdfc56d19)

26 years agofix problem with output file not being properly sorted
Herb Lewis [Tue, 28 Apr 1998 18:58:20 +0000 (18:58 +0000)]
fix problem with output file not being properly sorted
(This used to be commit d13678b079faf0da91b4ef582481fb987d377c8a)

26 years agoFixed checked in code that didn't compile.
Jeremy Allison [Tue, 28 Apr 1998 16:43:02 +0000 (16:43 +0000)]
Fixed checked in code that didn't compile.
Jeremy.
(This used to be commit 5f258abf526243f753c3a64cde2e1f67e4d60b6b)

26 years agoadded NetShareEnum from Bartlomej Czardybon <czar@silesia.pik-net.pl>
Luke Leighton [Tue, 28 Apr 1998 09:53:42 +0000 (09:53 +0000)]
added NetShareEnum from Bartlomej Czardybon <czar@silesia.pik-net.pl>
(This used to be commit 37cbc356741055d0660b80594117fa312d252b85)

26 years agoFirst version that compiles. Much more to do.....
Jeremy Allison [Tue, 28 Apr 1998 01:24:40 +0000 (01:24 +0000)]
First version that compiles. Much more to do.....
Jeremy.
(This used to be commit 45393a19adb31820725fbdfaaf7ab64793fc9bc5)

26 years agoAdded SuSE packaging files.
Volker Lendecke [Mon, 27 Apr 1998 09:11:28 +0000 (09:11 +0000)]
Added SuSE packaging files.

Volker
(This used to be commit 201330a729db1a45a069ecb5188059a0a84cea52)

26 years agoThis looks like a big change but really isn't.
Jeremy Allison [Sat, 25 Apr 1998 01:12:08 +0000 (01:12 +0000)]
This looks like a big change but really isn't.
It is changing the global variables "myname" and "myworkgroup"
to "global_myname" and "global_myworkgroup" respectively.

This is to make it very explicit when we are messing
with a global (don't ask - it makes the domain client
code much clearer :-).

Jeremy.
(This used to be commit 866406bfe399cf757c8275093dacd5ce4843afa0)

26 years agoABOUT time. dce/rpc long packet format now works, server-side.
Luke Leighton [Fri, 24 Apr 1998 21:01:08 +0000 (21:01 +0000)]
ABOUT time.  dce/rpc long packet format now works, server-side.
turns out that [it can be deduced that] microsoft ignores the SMBreadX
offset, and goes by the SMBreadX length only.  this makes for a lot simpler
code, in both client and server.
(This used to be commit a8b641c027c8cce179455ac1f6fd0322a8ab017d)

26 years agocli_pipe.c: Corrected cli_api_pipe() calls.
Jeremy Allison [Fri, 24 Apr 1998 00:34:21 +0000 (00:34 +0000)]
cli_pipe.c: Corrected cli_api_pipe() calls.
Jeremy.
(This used to be commit 2571ba0213c0630a96657fd6591e19adce1d9304)

26 years agoMakefile: Added nterr.c into the mix.
Jeremy Allison [Thu, 23 Apr 1998 22:59:19 +0000 (22:59 +0000)]
Makefile: Added nterr.c into the mix.
clientgen.c: Added nt_error as an entry in the struct client_state.
password.c: Open the netlogon pipe.
smb.h: Added nt_error as an entry in the struct client_state.
lib/rpc/parse/parse_net.c: Added comments on net logon.
lib/rpc/server/srv_netlog.c: Added comments on net logon.
Jeremy.
(This used to be commit 899a9f0dce50c73e03c8da2ebe920957491c8ad7)

26 years agoThese don't compile yet - but they are the core code in what
Jeremy Allison [Thu, 23 Apr 1998 22:45:53 +0000 (22:45 +0000)]
These don't compile yet - but they are the core code in what
will be DOMAIN_CLIENT called code.
Jeremy.
(This used to be commit ad81735fa1ce02937f6aae3d6518c1cd6156b090)

26 years agoWe will need this new nterr.c for the DOMAIN_CLIENT code.
Jeremy Allison [Thu, 23 Apr 1998 22:08:39 +0000 (22:08 +0000)]
We will need this new nterr.c for the DOMAIN_CLIENT code.
Jeremy.
(This used to be commit 932b22cd495b9ce1ba03e5b91a50b314167255d7)

26 years agoclientgen.c: Added rap error codes to cli_error, moved from smbpasswd.c
Jeremy Allison [Thu, 23 Apr 1998 20:12:17 +0000 (20:12 +0000)]
clientgen.c: Added rap error codes to cli_error, moved from smbpasswd.c
password.c: Changed global cli -> pw_cli, removed strtok (bad strtok, bad :-)
use in security=server, started to extend security=domain code.
smbpasswd.c: Removed rap error code functions.
Jeremy.
(This used to be commit 0f00b8fce1a5cad7f8c212568fa33f09986e5bd6)

26 years agogenrand.c: Changed SMB_PASSWD_FILE to lp_smb_passwd_file().
Jeremy Allison [Thu, 23 Apr 1998 18:54:57 +0000 (18:54 +0000)]
genrand.c: Changed SMB_PASSWD_FILE to lp_smb_passwd_file().
password.c: Started the initial code for domain_client_validate(). All
            bracketed with #ifdef DOMAIN_CLIENT for now.
reply.c: Call to domain_client_validate(). All
            bracketed with #ifdef DOMAIN_CLIENT for now.
smbpass.c: New code to get/set machine passwords. Tidied up nesting
           of lock calls.
Jeremy.
(This used to be commit 89fe059a6816f32d2cc5c4c04c4089b60590e7e6)

26 years agoFixed bug found by Gerald Carter <cartegw@Eng.Auburn.EDU> where
Jeremy Allison [Wed, 22 Apr 1998 17:59:44 +0000 (17:59 +0000)]
Fixed bug found by Gerald Carter <cartegw@Eng.Auburn.EDU> where
global myname was being overwritten incorrectly.
Jeremy.
(This used to be commit a3e7cf1b8a2fc950d41f5f2d5318cf88874165cd)

26 years agogenrand.c: Improved generation of random values, more secure.
Jeremy Allison [Wed, 22 Apr 1998 00:56:38 +0000 (00:56 +0000)]
genrand.c: Improved generation of random values, more secure.
loadparm.c: Started add of 'security=domain' code.
password.c: Fix for security=server NT bugs.
reply.c: Started add of 'security=domain' code.
server.c: Started add of 'security=domain' code.
smb.h: Started add of 'security=domain' code.
Jeremy.
(This used to be commit e6bda112ebe0d41f54c4249b5c2e1f24011347e1)

26 years agomany systems don't have /etc/shadow but do have another system for
Andrew Tridgell [Tue, 21 Apr 1998 07:26:15 +0000 (07:26 +0000)]
many systems don't have /etc/shadow but do have another system for
making encrypted passwords secret. For example, with secure NIS+ only
root can get the encrypted password.

hash in the encrypted password of "root" to provide a nice source of
secret on such systems. On systems that don't have this (ie. any user
can get roots encrypted password) then the security is so slack that
it probably doesn't matter what we do to generate the secret.
(This used to be commit 3271e4c29fdc15a1ae61dec94517e484c2457411)

26 years agoimproved the secret buffer generation a bit. It now uses /etc/shadow
Andrew Tridgell [Tue, 21 Apr 1998 07:17:35 +0000 (07:17 +0000)]
improved the secret buffer generation a bit. It now uses /etc/shadow
and smbpasswd if possible, and doesn't put it all through a 32 bit
bottleneck.
(This used to be commit 356ec24840da98f9e0b49b8eecb56aeec5ed848e)

26 years agoput server-side long dce/rpc code in main branch.
Luke Leighton [Tue, 21 Apr 1998 02:36:37 +0000 (02:36 +0000)]
put server-side long dce/rpc code in main branch.
(This used to be commit 2e1a08b28c1c0c9ea988a09067cd149926f25c69)

26 years agoAdded cli_ulogoff() calls to all the exit code paths in security=server.
Jeremy Allison [Tue, 21 Apr 1998 02:27:12 +0000 (02:27 +0000)]
Added cli_ulogoff() calls to all the exit code paths in security=server.
Jeremy.
(This used to be commit 78d87a5bfdfc6d3f4428591d30294fe7d05d0f91)

26 years agoclientgen.c: Added cli_ulogoff() call.
Jeremy Allison [Tue, 21 Apr 1998 02:23:24 +0000 (02:23 +0000)]
clientgen.c: Added cli_ulogoff() call.
password.c: Added call to cli_ulogoff on successfull sessionsetup.
Jeremy.
(This used to be commit 77882f002b2a8203aad419e485fc885303d999a0)

26 years agogenrand.c: Improved filename based random seed generation.
Jeremy Allison [Mon, 20 Apr 1998 23:57:29 +0000 (23:57 +0000)]
genrand.c: Improved filename based random seed generation.
lib/rpc/server/srv_netlog.c: Changed to use generate_random_buffer().
Jeremy.
(This used to be commit 093d060a06d75c6ee5b1329d524334f4db97cba6)

26 years agoAdded 'passwd chat debug' parameter to allow admins to debug their
Jeremy Allison [Mon, 20 Apr 1998 23:07:28 +0000 (23:07 +0000)]
Added 'passwd chat debug' parameter to allow admins to debug their
Samba passwd chat scripts.
Jeremy.
(This used to be commit 5a995f4f75ffb0d55d6ceaa63a1209d230001991)

26 years agoMakefile: Added genrand.o
Jeremy Allison [Mon, 20 Apr 1998 22:43:54 +0000 (22:43 +0000)]
Makefile: Added genrand.o
clientgen.c: Changed to fill change password buffer with random stuff.
password.c: Changed to get challenge from genrand.c
server.c: Added #ifdef around O_SYNC.
version.h: Changed to 1.9.19prealpha.
genrand.c:

   New code to generate (hopefully) good random numbers for
use in crypto challenges/session keys etc.

PLEASE REVIEW THIS CODE AND SUGGEST IMPROVEMENTS !!!!!!

Jeremy.
(This used to be commit 608e98546392fd0aac9b33f4feac43615dbb4405)

26 years agoFixed bug that John found in WINS server code. When nmbd as a WINS
Jeremy Allison [Mon, 20 Apr 1998 20:32:50 +0000 (20:32 +0000)]
Fixed bug that John found in WINS server code. When nmbd as a WINS
server is sending out a name_query after a WACK, it needs to send
a packet with recursion_desired = 0 (yes Luke, you were right all
along :-). If it doesn't then if it's talking to itself then the
query packet ends up back in the WINS server instead of in the client
side code.
Makefile: Changed proto generation to stop including NMBDOBJ twice.
nmbd_namequery.c nmbd_packets.c nmbd_winsserver.c: Added extra
query_name_from_wins_server() code.

Jeremy.
(This used to be commit c5ca05c29546053a771f4ea3ef850efb3be970ea)

26 years agoincludes.h: Added John's redhat fix for QSORT_CAST.
Jeremy Allison [Sat, 18 Apr 1998 02:00:39 +0000 (02:00 +0000)]
includes.h: Added John's redhat fix for QSORT_CAST.
smbpass.c: Added lock depth code so calls to pw_file_lock() can be nested.
           Fixed codedump problems in add_smbpwd_entry().
smbpasswd.c: Removed all the code that manipulated the password file
             directly. Now *all* smbpasswd file changes are done through
             the interfaces defined in smbpass.c This should make
             the life of people adding alternate backend databases
             *much* easier.
lib/rpc/server/srv_netlog.c: Removed debug messages used to debug
                             machine password changing.
Jeremy.
(This used to be commit c9f61be08f3691a6421734d8b026a295d9cbd6ba)

26 years agoclientgen.c: Changes 'cli_xxx_' calls to use the following
Jeremy Allison [Fri, 17 Apr 1998 22:44:01 +0000 (22:44 +0000)]
clientgen.c: Changes 'cli_xxx_' calls to use the following
regularized parameter syntax:

   setup, setup_count, max_setup_count,
   params, params_count, max_params_count,
   data, data_count, max_data_count,

(and if a reply is needed)

   *reply_params, *reply_data_len
   *reply_data, *reply_data_len

This allows the pointers and the lengths
that relate to these pointers to be next
to each other in the parameter list. This
makes seeing what you are passing to these
functions much easier to see.

Getting ready for adding the lib/rpc/client
functions needed to do security=domain.

torture.c: Fixed it so it uses / rather than \\
internally for the //machine/share syntax.

Jeremy.
(This used to be commit 38350ea8b949d0908497490898ff04df7591ccac)

26 years agoChanging of machine passwords now works !!!!!!
Jeremy Allison [Fri, 17 Apr 1998 19:29:51 +0000 (19:29 +0000)]
Changing of machine passwords now works !!!!!!
smbdes.c: Added cred_hash3.
smbpasswd.c: Fixes for adding a machine account (needs more work).
lib/rpc/server/srv_netlog.c: Turn on the machine password changing
code by default (calls cred_hash3).
Jeremy.
(This used to be commit 50aa513b969c6e41911aeee8207b065f93af0beb)

26 years agoJust changed the date.
Christopher R. Hertel [Fri, 17 Apr 1998 15:22:33 +0000 (15:22 +0000)]
Just changed the date.
(This used to be commit f430e4b0fa949d3010210fb9ab894b082388d032)

26 years agoreply.c: Fix bugs where debug statements were accessing the fd_ptr struct
Jeremy Allison [Thu, 16 Apr 1998 19:23:10 +0000 (19:23 +0000)]
reply.c: Fix bugs where debug statements were accessing the fd_ptr struct
internals after Andrews' code had memset it to zero (this was causing core
dumps).
charcnv.c: Fixes for ISO8859-2 from Petr Hubeny <psh@capitol.cz>.
Jeremy.
(This used to be commit df8783ca76d543d200c743f515a185cfea2880df)

26 years agoMinor change to the wording. It used to say "files with the prefix 'ubi_'"
Christopher R. Hertel [Thu, 16 Apr 1998 15:48:07 +0000 (15:48 +0000)]
Minor change to the wording.  It used to say "files with the prefix 'ubi_'"
or some such.  Some future files won't have the ubi_ prefix.  -)----- Chris
(This used to be commit 955a9f9199b468b72c4b828fed5b2903d0a5273a)

26 years agoipc.c: Fix for printer queue spinning with Win95.
Jeremy Allison [Wed, 15 Apr 1998 20:00:41 +0000 (20:00 +0000)]
ipc.c: Fix for printer queue spinning with Win95.
nmbd.c: Fix for always overwriting log despite append setting.
smb.h: Addition of last time password changed entry to account info.
smbpass.c: Changes to support last time changed field in smbpasswd file.
smbpasswd.c: Changes to support last time changed field in smbpasswd file.
util.c: Fix for always overwriting log despite append setting.
Jeremy.
(This used to be commit eb4fe9ecdf539209efab07dc992447ea7370cf93)

26 years agoFixed some typecast and function pointer problems pointed out by a
Christopher R. Hertel [Tue, 14 Apr 1998 14:43:38 +0000 (14:43 +0000)]
Fixed some typecast and function pointer problems pointed out by a
programmer in Finland.

Chris -)-----
(This used to be commit 7ba2195cc1914fbdfdd30eff207ea55ffc3aeb02)

26 years agoModified interfaces to getting smb password entries from
Jeremy Allison [Tue, 14 Apr 1998 00:41:59 +0000 (00:41 +0000)]
Modified interfaces to getting smb password entries from
get_smbpwd_entry (now an internal function to smbpass.c)
to a more UNIX-like :

getsmbpwnam() - get entry by name.
getsmbpwuid() - get entry by uid.

Changed the type returned by the smbpasswd enumeration
functions to be a void * so that people don't come to
depend on it being a FILE *.

These abstractions should make it much easier to
replace the smbpasswd file with a better backend
in future.

Other files changed are to match the above changes.

Jeremy.
(This used to be commit 1161cfb7f2b0d5a6d3e2b524a14a6f325ce70efb)

26 years agomake it look for only the proper lines to uncomment.
Herb Lewis [Mon, 13 Apr 1998 23:39:43 +0000 (23:39 +0000)]
make it look for only the proper lines to uncomment.
(This used to be commit c963ec8cc4bd311023ca4ad00ded4502989b7faa)

26 years agoFixed aggregate initializer problem for gcc.
Jeremy Allison [Mon, 13 Apr 1998 23:27:22 +0000 (23:27 +0000)]
Fixed aggregate initializer problem for gcc.
Jeremy.
(This used to be commit e74428e4287cbc1557cc79d4930371cfaf3256d4)

26 years agoChanges include:
Christopher R. Hertel [Mon, 13 Apr 1998 22:45:52 +0000 (22:45 +0000)]
Changes include:

proto.h:  The unusual.  ;)
reply.c:  I changes some function names, and updated reply.c to match.
          See mangle.c below for more.
server.c: Changed function names and parameters in file mangle.c, so
          changed server.c calls to match.  See mangle.c below for more.

mangle.c:

  I replaced the caching mechanism used for caching reverse mangled name
  maps.  The old method was a large array of 256-byte strings.  Movement
  in the stack (including push and pop) was done by memcpy()ing whole
  chunks of memory around.

  The new system uses the ubi_Cache module which, in turn, uses a splay
  tree.  Entries are dynamically allocated using a minimum amount of
  memory.  Searches are non-linear, which should speed things up a bit,
  too.  Overall, this should save memory and be faster.

  Other changes:  I streamlined the is_mangled() test and made other
  speed enhancements including replacing some static functions with
  macros.  Added comments, etc.

Note:  Per an E'mail conversation with Andrew, the 'mangled stack'
       parameter in smb.conf doesn't do anything anymore.  The cache is
       now set for 16K bytes maximum memory usage.  The mangle stack
       parameter is silently ignored.  This can easily be changed, but
       I'd rather introduce a 'mangled cache memory' parameter and
       remove 'mangled stack'.

Remaining problems:
       While testing the module, I noticed that something is calling
       name_map_mangle() twice.  The result is that names which contain
       illegal characters are getting mangled twice.

       Also, the entire module works by overwriting the input string.
       This has a variety of nasty side effects.

Summary:

  There's a lot still to be done, but the changes I have in place *should*
  work in exactly the same way (except for the mangle stack parameter).
  The rest of the bugs and other issues are separate.

Chris -)-----
(This used to be commit 8759bec11ba483b2292b0e513b85c98ed5e3e2d4)

26 years agoChanges to allow Samba to be compiled with -Wstrict-prototypes
Jeremy Allison [Mon, 13 Apr 1998 19:24:06 +0000 (19:24 +0000)]
Changes to allow Samba to be compiled with -Wstrict-prototypes
with gcc. (Not a big change although it looks like it :-).

Jeremy.
(This used to be commit cd2613c57261456485fe4eeecfda209ada70de8e)

26 years agoContributed software for Linux autofs support.
John Terpstra [Mon, 13 Apr 1998 12:31:10 +0000 (12:31 +0000)]
Contributed software for Linux autofs support.
(This used to be commit 883be3907778ee160872b0a0a023fc34e636774f)

26 years agofixed a memory leak in close_file(). Each time a file was opened
Andrew Tridgell [Mon, 13 Apr 1998 11:12:44 +0000 (11:12 +0000)]
fixed a memory leak in close_file(). Each time a file was opened
we leaked memory equal to the length of the filename.
(This used to be commit 30a347de74f7f8e2646b1853a9e5914320cee58d)

26 years agoAs it says.
John Terpstra [Mon, 13 Apr 1998 10:30:50 +0000 (10:30 +0000)]
As it says.
(This used to be commit adf4b3ffd78dd99e593b4d9f34389d436b90fa72)

26 years agoAdded additional comments from Bruce Wood
John Terpstra [Sun, 12 Apr 1998 06:24:27 +0000 (06:24 +0000)]
Added additional comments from Bruce Wood
(This used to be commit cd1e7eb8b13ed84dce740de92ef8620280430476)

26 years agominor reformatting of debug messages (so people don't think there is a
Andrew Tridgell [Sun, 12 Apr 1998 02:54:31 +0000 (02:54 +0000)]
minor reformatting of debug messages (so people don't think there is a
. on the end of their host names)
(This used to be commit dd3fe9fb471a803747957a898693a5890d71e176)

26 years agosome hacks to the torture code
Andrew Tridgell [Sun, 12 Apr 1998 02:53:17 +0000 (02:53 +0000)]
some hacks to the torture code
(This used to be commit 02786747ee6774f617d95b08a5c5912bf86e7586)

26 years agosupport O_SYNC at open time in files (previously we only supported it
Andrew Tridgell [Sun, 12 Apr 1998 02:52:13 +0000 (02:52 +0000)]
support O_SYNC at open time in files (previously we only supported it
on individual writes)
(This used to be commit ce017a233ba5c68e340e0d31634f9bd93118b20a)

26 years agoif the resolve order is blank then assume "host"
Andrew Tridgell [Sun, 12 Apr 1998 02:50:43 +0000 (02:50 +0000)]
if the resolve order is blank then assume "host"
(This used to be commit d361a06fa14b899cf1bd697a9524b5a32f7bf204)

26 years agosupport O_SYNC in opens for smbtorture
Andrew Tridgell [Sun, 12 Apr 1998 02:48:52 +0000 (02:48 +0000)]
support O_SYNC in opens for smbtorture
(This used to be commit 000b871839e12065fc514f857ba205590a95b040)

26 years agoCorrected the spelling of my Surname. Added several postscripts.
John Terpstra [Sat, 11 Apr 1998 15:15:29 +0000 (15:15 +0000)]
Corrected the spelling of my Surname. Added several postscripts.
Extended info on Win95 logins to Windows NT.
(This used to be commit 237f80b128def6d9ec903cfebe12eec82913964f)

26 years agocreated from a really useful discussion about Win95 / NT profiles.
Luke Leighton [Sat, 11 Apr 1998 14:00:37 +0000 (14:00 +0000)]
created from a really useful discussion about Win95 / NT profiles.

Contributors: Bruce Cook <BC3-AU@bigfoot.com>
Copyright (C) 1998 Bruce Cook

John Terpestra <samba-bugs@samba.anu.edu.au>
Copyright (C) 1998 John H. Terpestra

Wolfgang Ratzka <ratzka@hrz.uni-marburg.de>
Copyright (C) 1998 Wolfgang Ratzka
(This used to be commit 2d7d013e0ca8fc2e97eb8299e3d847c57c40ed1c)

26 years agoFix heaps of warnings when compiling with gcc under Digital UNIX. Include route.h
Richard Sharpe [Sat, 11 Apr 1998 13:02:11 +0000 (13:02 +0000)]
Fix heaps of warnings when compiling with gcc under Digital UNIX. Include route.h
and mbuf.h at a strategic point ... Wierd stuff really, because the Digital
compiler does not complain either way, but GCC does.
(This used to be commit 241fde3c713c91961b6bcb97ecb046ac2f3bb00b)