tprouty/samba.git
25 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.

25 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.

25 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.

25 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".

25 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

25 years agoremoved proto.h from cvsignore
Luke Leighton [Fri, 8 May 1998 17:01:25 +0000 (17:01 +0000)]
removed proto.h from cvsignore

25 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.

25 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.

25 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.

25 years agoadded proto.h to .cvsignore
Luke Leighton [Fri, 8 May 1998 14:14:26 +0000 (14:14 +0000)]
added proto.h to .cvsignore

25 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

25 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

25 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...

25 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.

25 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.

25 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.

25 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.

25 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.

25 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...

25 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.

25 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

25 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.

25 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.

25 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.

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

25 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.

25 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.

25 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.

25 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...

25 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

25 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

25 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. :-)

25 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.

25 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.

25 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.

25 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

25 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.

25 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

25 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

25 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

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.

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.

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.

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.

26 years agoadd clean option
Herb Lewis [Wed, 29 Apr 1998 13:45:27 +0000 (13:45 +0000)]
add clean option

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".

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.

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

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.

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>

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.

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

Volker

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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

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.

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

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.

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

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.

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.

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.

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

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.

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.

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.

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

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

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)

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

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)

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"

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

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.

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

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.

26 years agoUpdated to include possible cause of failed TESTS 3/6 as bad broadcast address.
John Terpstra [Sat, 11 Apr 1998 11:09:12 +0000 (11:09 +0000)]
Updated to include possible cause of failed TESTS 3/6 as bad broadcast address.

26 years agoOops, fogot proto.h. It needs to be updated for changes to client.c
Richard Sharpe [Sat, 11 Apr 1998 08:14:53 +0000 (08:14 +0000)]
Oops, fogot proto.h. It needs to be updated for changes to client.c

26 years agosmbclient.1 updated to reflect the new functionality and to document functionality
Richard Sharpe [Sat, 11 Apr 1998 08:00:49 +0000 (08:00 +0000)]
smbclient.1 updated to reflect the new functionality and to document functionality
that has been available for a long time. More updates needed ... people tend to forget
the man pages when adding functionality.

26 years agoChanges to client.c support the need for directories to be processed by whatever
Richard Sharpe [Sat, 11 Apr 1998 07:52:13 +0000 (07:52 +0000)]
Changes to client.c support the need for directories to be processed by whatever
action is passed to do_dir.

Changes to clitar.c as requested by Canon Information Systems Research Australia:

1. Support restoring long file names
2. Write directory entries to TAR files as first part of setting directory create
   times
3. Ensure zero length files get correct mtime
4. Allow DOS and UNIX pathnames in command line parameters.