samba.git
26 years agoThis commit was manufactured by cvs2svn to create tag samba-1.9.17p3
cvs2svn Import User [Wed, 15 Oct 1997 01:38:14 +0000 (01:38 +0000)]
This commit was manufactured by cvs2svn to create tag
'release-1-9-17p3'.

26 years agopreparing for release of 1.9.17p3
Samba Release Account [Wed, 15 Oct 1997 01:38:13 +0000 (01:38 +0000)]
preparing for release of 1.9.17p3

26 years agoUpdated for 1.9.17p3 release.
Samba Release Account [Wed, 15 Oct 1997 01:34:56 +0000 (01:34 +0000)]
Updated for 1.9.17p3 release.
Jeremy (jallison@whistle,com):

26 years agoAdded #ifdef'ed code with BIND_LOCAL_OUTPUT_SOCKET that causes
Samba Release Account [Wed, 15 Oct 1997 01:34:04 +0000 (01:34 +0000)]
Added #ifdef'ed code with BIND_LOCAL_OUTPUT_SOCKET that causes
optput sockets to be bound to the same local address as input
ones are.
Jeremy (jallison@whistle.com)

26 years agodocs/DIAGNOSIS.txt:
John Terpstra [Tue, 14 Oct 1997 13:18:07 +0000 (13:18 +0000)]
docs/DIAGNOSIS.txt:
Added comments up front about "your server is being unfriendly"
and need to check IP name resolution.

26 years agoadd become_root()/unbecome_root() calls. These should be used around
Andrew Tridgell [Tue, 14 Oct 1997 09:15:58 +0000 (09:15 +0000)]
add become_root()/unbecome_root() calls. These should be used around
regions of the code that need root privilages but which normally don't
have them (ie. when processing most SMBs). These functions can
optionally save/restore the current working directory as well

updated several places in the code that previously used unbecome_user()
to achieve the same thing to now use become_root() and unbecome_root()

changed close_file() to take an additional argument which says whether
this is a normal SMBclose type call or a close that resulted from some
other action, such as the close of a connection. If it is a abnormal
close then don't use magic scripts or print files.

changed sys_utime() to ignore any attempt to set the modification time
to 0 or -1. We've had reports that files have had their time set to
0 so this should catch those.

26 years agominor fixes to mangling and oplocks entries in man page
Andrew Tridgell [Tue, 14 Oct 1997 02:53:58 +0000 (02:53 +0000)]
minor fixes to mangling and oplocks entries in man page

26 years agoUpdated to stop problems with become_user.
Jeremy Allison [Tue, 14 Oct 1997 01:53:20 +0000 (01:53 +0000)]
Updated to stop problems with become_user.
Jeremy (jallison@whistle.com)

26 years agoupdated the "comment =" entry a bit
Andrew Tridgell [Sun, 12 Oct 1997 23:51:46 +0000 (23:51 +0000)]
updated the "comment =" entry a bit

26 years agoremove { and } from the list of illegal characters in filenames. The
Andrew Tridgell [Sun, 12 Oct 1997 03:49:29 +0000 (03:49 +0000)]
remove { and } from the list of illegal characters in filenames. The
CIFS3 spec does not list them as illegal.

This allows things like the control panel icon to be placed on a Samba
drive.

26 years agoAdded Luke's changes to release tree.
Jeremy Allison [Fri, 10 Oct 1997 23:02:49 +0000 (23:02 +0000)]
Added Luke's changes to release tree.
Jeremy (jallison@whistle.com)

26 years agoUpdating for 1.9.17p3 release.
Jeremy Allison [Fri, 10 Oct 1997 22:59:43 +0000 (22:59 +0000)]
Updating for 1.9.17p3 release.
Jeremy (jallison@whistle.com)

26 years agofixed the log wrapping bug.
Andrew Tridgell [Fri, 10 Oct 1997 02:35:55 +0000 (02:35 +0000)]
fixed the log wrapping bug.

This is a very nasty bug that I think explains quite a few
intermittent problems people have been having with Samba.

It may be worth checking on other cases where errno can be overwritten
by seemingly innocuous things (in this case a DEBUG() line)

26 years agochange MAX_PASSWORD_LENGTH to MAX_PASS_LEN to prevent conflict on some
Andrew Tridgell [Thu, 9 Oct 1997 06:47:20 +0000 (06:47 +0000)]
change MAX_PASSWORD_LENGTH to MAX_PASS_LEN to prevent conflict on some
systems

26 years agopredict.c: stop lseek from extending file. Hard to test.
Jeremy Allison [Thu, 9 Oct 1997 00:43:55 +0000 (00:43 +0000)]
predict.c: stop lseek from extending file. Hard to test.
proto.h: updated.
quotas.c: Added FreeBSD fixes.
server.c: Added quota overflow fix for large filesystems. Rolled
back to old error codes.
Jeremy (jallison@whistle.com)

26 years agoput this in 1.9.17 also ...
Andrew Tridgell [Wed, 8 Oct 1997 02:18:45 +0000 (02:18 +0000)]
put this in 1.9.17 also ...

change the semantics of hosts allow/hosts deny so that a global
setting applies to all shares regardless of any settings on other
shares. This allows us to immediately drop a connection if it does not
come from a allowed host, without even parsing the first SMB
packet. The next time we get a nasty security hole we can offer people
the option of just setting their hosts allow line.

If we drop a connection in this way we generate a "Not listening for
calling name" response and then exit.

26 years agoAdded ERROR_MORE_DATA fix when replies have been truncated.
Jeremy Allison [Wed, 8 Oct 1997 00:24:38 +0000 (00:24 +0000)]
Added ERROR_MORE_DATA fix when replies have been truncated.
Jeremy (jallison@whistle.com)

26 years agoFixed nasty (but rare) race mode condition with slow share
Jeremy Allison [Tue, 7 Oct 1997 19:24:44 +0000 (19:24 +0000)]
Fixed nasty (but rare) race mode condition with slow share
mode code.
Jeremy (jallison@whistle.com)

26 years agoincrease the debug level in the "client requested max ..." debug line
Andrew Tridgell [Tue, 7 Oct 1997 14:38:31 +0000 (14:38 +0000)]
increase the debug level in the "client requested max ..." debug line

26 years agoincrease the debug level in the "added interface" debug line
Andrew Tridgell [Tue, 7 Oct 1997 14:36:51 +0000 (14:36 +0000)]
increase the debug level in the "added interface" debug line

26 years agoget rid of SIGCLD_IGNORE for HPUX. A user reported it causing lots
Andrew Tridgell [Tue, 7 Oct 1997 11:18:26 +0000 (11:18 +0000)]
get rid of SIGCLD_IGNORE for HPUX. A user reported it causing lots
of defunct smbd processes.

Andrew

26 years agolocking.c: Finally fixed nasty crash bug when deleting invalid share
Jeremy Allison [Mon, 6 Oct 1997 19:54:33 +0000 (19:54 +0000)]
locking.c: Finally fixed nasty crash bug when deleting invalid share
mode entries.
util.c: Tried to stop put_ip core dump seemingly caused
by bad returns from gethostbyname.
Jeremy (jallison@whistle.com)

26 years agoJHT ===> Added Sun Solaris binary package building spec files contributed
John Terpstra [Sat, 4 Oct 1997 02:57:14 +0000 (02:57 +0000)]
JHT ===> Added Sun Solaris binary package building spec files contributed
         by Tim Towers <tim@lorien.demon.co.uk>. Note: Not yet checked.

26 years agonmblookup.c:
Christopher R. Hertel [Sat, 4 Oct 1997 01:07:47 +0000 (01:07 +0000)]
nmblookup.c:
  I've added a -r option.  When specified, nmblookup will attempt to bind
  to port 137.  In order for this to work, the user must be root and the
  port must be available (i.e., nmbd not running).  If either condition is
  not met, nmblookup will default to normal behavior; it will try to bind
  to a free port above 7999.  I also removed an artifact.  The -p <port>
  option was being accepted but falling through to the default, which was
  the usage message.  I removed "p:" from the getopt() list.

params.c:
  Rewritten.  The scanning is much more linear, and I found and fixed a
  few bugs.  I don't like the way that the scratch buffer is handled,
  but I believe that it is an improvement over the previous version.

Chris -)-----

26 years agoRace condition with multiple oplock break requests happens
Jeremy Allison [Sat, 4 Oct 1997 00:23:57 +0000 (00:23 +0000)]
Race condition with multiple oplock break requests happens
more often than you might think (reproduced here with 4 clients
and netbench :-).
Raising debug log level for report from 1 to 3.
Jeremy (jallison@whistle.com)

26 years agoMaking it harder for share_mode_entries to be left with
Jeremy Allison [Fri, 3 Oct 1997 23:45:34 +0000 (23:45 +0000)]
Making it harder for share_mode_entries to be left with
non-zero op_type fields. Paranoia code really.
Jeremy (jallison@whistle.com)

26 years agolocking.c: Fixed incorrect parameter count in debug statements. May explain
Jeremy Allison [Fri, 3 Oct 1997 20:36:06 +0000 (20:36 +0000)]
locking.c: Fixed incorrect parameter count in debug statements. May explain
           solaris crashes.
reply.c: Added NT specific error code. Put oplock break code in correct place
         in reply_lockingX.
server.c: Removed unneeded error mapping stuff.
          Fixed race condition in oplock code.
trans2.c: Added NT specific error code.
util.c: Added paranoia check in interpret_addr. Some core dumps
        reported here. Upped fcntl debug levels.

Andrew. Please check the NT specific error code handling (search
for the string "/* Ugly - NT specific hack - but needed (JRA) */",
this makes NT and 95 clients behave correctly here - please check
your Visual Basic apps with this code.

Jeremy (jallison@whistle.com).

26 years agoadd "static" to a couple of functions that are only used locally.
Andrew Tridgell [Fri, 3 Oct 1997 03:34:19 +0000 (03:34 +0000)]
add "static" to a couple of functions that are only used locally.

set granted_oplock=False at the start of open_file(). This is
paranoia.

26 years agoproto.h: Updated.
Jeremy Allison [Fri, 3 Oct 1997 03:15:24 +0000 (03:15 +0000)]
proto.h: Updated.
server.c: Updated after netbench observation. Oplocks must be
broken *before* share modes are checked, not after. Netbench seems
to be working now.
smb.h: Added offsets for oplock break time fields.
trans2.c: Upped debug messages.
util.c: Upped debug messages.
Jeremy (jallison@whistle.com)

26 years agochange a debug level in reply.c
Andrew Tridgell [Thu, 2 Oct 1997 14:11:34 +0000 (14:11 +0000)]
change a debug level in reply.c

change from ERRbaddirectory to ERRbadpath for ENOTDIR errors. This
reverts to the old Samba code. I've done quite a bit of testing
against NT4 and have yet to get it to produce the ERRbaddirectory
error code. Producing ERRbaddirectory made a visual basic application
that was sent to me not run. This might explain some of the "it
doesn't work any more" complaints we've got about 1.9.17.

Jeremy, can you remember how you got NT to produce ERRbaddirectory?
There might be some specific circumstances we need to cover.

26 years agoAdded debug message for oplock_break().
Jeremy Allison [Thu, 2 Oct 1997 03:26:07 +0000 (03:26 +0000)]
Added debug message for oplock_break().
Jeremy (jallison@whistle.com)

26 years agochange the semantics of hosts allow/hosts deny so that a global
Andrew Tridgell [Thu, 2 Oct 1997 03:14:32 +0000 (03:14 +0000)]
change the semantics of hosts allow/hosts deny so that a global
setting applies to all shares regardless of any settings on other
shares. This allows us to immediately drop a connection if it does not
come from a allowed host, without even parsing the first SMB
packet. The next time we get a nasty security hole we can offer people
the option of just setting their hosts allow line.

If we drop a connection in this way we generate a "Not listening for
calling name" response and then exit.

add a per share "oplocks" option in smb.conf. I think its important to
be able to disable oplocks on a per-share basis as there are occasions
then they are definately not wanted, for example when sharing data
between a windows box and a unix application. This also allows us to
tell people "try disabling oplocks" when diagnosing problems.

fix a bug in process_smb(). It was taking the length of the packet
from outbuf, not inbuf (this bug was introduced with the oplocks
code). Jeremy, I assume this wasn't deliberate?

26 years agoModified some debug messages, moved from 5 -> 8.
Jeremy Allison [Thu, 2 Oct 1997 02:36:11 +0000 (02:36 +0000)]
Modified some debug messages, moved from 5 -> 8.
Jeremy (jallison@whistle.com)

26 years agoFixed problem with oplock_type being set with no port.
Jeremy Allison [Thu, 2 Oct 1997 00:57:59 +0000 (00:57 +0000)]
Fixed problem with oplock_type being set with no port.
Jeremy (jallison@whistle.com)

26 years agoOPLOCK CHECK-IN - oplocks are now *OPERATIONAL* !!!!
Jeremy Allison [Wed, 1 Oct 1997 23:32:22 +0000 (23:32 +0000)]
OPLOCK CHECK-IN - oplocks are now *OPERATIONAL* !!!!
Yipeee. At least as far as I can check in a short time :-).

local.h: Changed OPLOCK_BREAK_TIMEOUT to 30 seconds.
locking.c: Big changes to delete oplocks on a share mode entry.
proto.h: updated.
reply.c: Added oplock break code in lockingX reply & readbraw reply.
server.c: Add batch oplock code. Force server shutdown if client fails
          to respond to oplock break.
smb.h: Fix silly slow share mode oplock define bug.
status.c: Add oplock status info.

Jeremy (jallison@whistle.com)

26 years agoSyncing up Support providers.
Jeremy Allison [Tue, 30 Sep 1997 17:13:32 +0000 (17:13 +0000)]
Syncing up Support providers.

26 years agoChanged consultant list.
Jeremy Allison [Tue, 30 Sep 1997 16:58:52 +0000 (16:58 +0000)]
Changed consultant list.
Jeremy (jallison@whistle.com)

26 years agodir.c: more pstrcpys.
Jeremy Allison [Tue, 30 Sep 1997 02:38:19 +0000 (02:38 +0000)]
dir.c: more pstrcpys.
local.h: Add OPLOCK_BREAK_TIMEOUT.
password.c: Fix for paranoia password server security bug.
proto.h: Updated.
reply.c: Oplock changes.
server.c: Massive oplock changes - nearly there....
smb.h: oplock definitions.
util.c: Add local message processing queues for oplocks.
Jeremy (jallison@whistle.com)

26 years agoFixed potential security bug with receive_smb passing in
Jeremy Allison [Mon, 29 Sep 1997 18:43:02 +0000 (18:43 +0000)]
Fixed potential security bug with receive_smb passing in
a pointer to a pstring instead of a full sized buffer.
Pointed out by : Matt Power mhpower@mit.edu

Jeremy (jallison@whistle.com)

26 years agoPut back changes to abort on overflow attack after conversation
Jeremy Allison [Sat, 27 Sep 1997 00:34:12 +0000 (00:34 +0000)]
Put back changes to abort on overflow attack after conversation
with Andrew.
Jeremy (jallison@whistle.com)

26 years agoCause overflow attack to return an error code rather than
Jeremy Allison [Fri, 26 Sep 1997 21:43:44 +0000 (21:43 +0000)]
Cause overflow attack to return an error code rather than
terminate smbd. Terminating smbd allows a denial of service
attack for multi-user NT servers.
Jeremy (jallison@whistle.com)

26 years agoFixed you're -> your text that some pedant complained about :-).
Jeremy Allison [Fri, 26 Sep 1997 19:40:59 +0000 (19:40 +0000)]
Fixed you're -> your text that some pedant complained about :-).
Jeremy (jallison@whistle.com).

26 years agoFixed you're -> your text that some pedant complained about :-).
Jeremy Allison [Fri, 26 Sep 1997 19:40:12 +0000 (19:40 +0000)]
Fixed you're -> your text that some pedant complained about :-).
Jeremy (jallison@whistle.com).

26 years agoSyncing up current oplock work in progress. #ifdef'ed out
Jeremy Allison [Fri, 26 Sep 1997 19:26:56 +0000 (19:26 +0000)]
Syncing up current oplock work in progress. #ifdef'ed out
so should have no effect on other work.
Jeremy (jallison@whistle.com)

26 years agoCorrectly rolled back interface.c (I was working on an older
Jeremy Allison [Fri, 26 Sep 1997 19:23:26 +0000 (19:23 +0000)]
Correctly rolled back interface.c (I was working on an older
revision). This will now be the current revision.
Jeremy (jallison@whistle.com)

26 years agoAdding Andrews buffer overflow fixes into the main branch.
Jeremy Allison [Fri, 26 Sep 1997 18:55:29 +0000 (18:55 +0000)]
Adding Andrews buffer overflow fixes into the main branch.
Jeremy (jallison@whistle.com)

26 years agoadd info about p2 release
Andrew Tridgell [Fri, 26 Sep 1997 13:09:36 +0000 (13:09 +0000)]
add info about p2 release

26 years agopreparing for release of 1.9.17p2
Samba Release Account [Fri, 26 Sep 1997 12:47:59 +0000 (12:47 +0000)]
preparing for release of 1.9.17p2

26 years agoThis commit fixes the security hole due to buffer overflows.
Andrew Tridgell [Fri, 26 Sep 1997 12:39:45 +0000 (12:39 +0000)]
This commit fixes the security hole due to buffer overflows.

The main fix is just a couple of lines long, but I have now also put
precautionary checks on a large number of other places in the code
where unchecked string copies were being performed. An exploit via one
of these copies is unlikely, but is is better to be safe.

I also added a routine to log possible exploit attempts using the code
that was posted for obtaining root access on a Samba server.

26 years agoadd error string reporting to clitar
Andrew Tridgell [Fri, 26 Sep 1997 09:06:51 +0000 (09:06 +0000)]
add error string reporting to clitar

26 years agoAdded missing slow share mode offset defines. Somehow
Jeremy Allison [Thu, 25 Sep 1997 17:36:21 +0000 (17:36 +0000)]
Added missing slow share mode offset defines. Somehow
they got lost.
Jeremy (jallison@whistle.com).

26 years agoMakefile: Removed earlier errors.
Jeremy Allison [Thu, 25 Sep 1997 00:25:44 +0000 (00:25 +0000)]
Makefile: Removed earlier errors.
includes.h: Added INADDR_LOOPBACK define.
locking.c: More code to support oplocks.
proto.h: Updated.
server.c: More code to support oplocks. Moved processing of an SMB out of
process() into a separate function so it is easier to call from an oplock
break.
smb.h: Added oplock fields.
Jeremy (jallison@whistle.com)

26 years agoCheckin to sync up oplock development code so that NT
Jeremy Allison [Tue, 23 Sep 1997 19:19:06 +0000 (19:19 +0000)]
Checkin to sync up oplock development code so that NT
domain development code won't diverge.

Makefile: Fixed make proto (again). Added GLIBC2 fixes for Linux.
includes.h: Added GLIBC2 fixes for Linux.
proto.h: Much tidier.
quotas.c: OSF/1 quota fix.
reply.c: Fix from Ray Frush <frush@engr.colostate.edu> for zero NT timestamps.
server.c util.c: First oplock checkin - nowhere near finished so bracketed
with #ifdef USE_OPLOCKS. Done to make sync with NT domain code easier.
Jeremy (jallison@whistle.com)

26 years agoadded code from Philip A Prindeville <philipp@enteka.com> which expands
Luke Leighton [Tue, 23 Sep 1997 16:09:12 +0000 (16:09 +0000)]
added code from Philip A Prindeville <philipp@enteka.com> which expands
the interfaces option to this:

"interfaces = le0 le1" or "interfaces = all".

it uses SIOCGIFxxxx ioctl calls.

26 years agoMakefile: Added glibc2 fixes for Linux.
Jeremy Allison [Mon, 22 Sep 1997 22:09:07 +0000 (22:09 +0000)]
Makefile: Added glibc2 fixes for Linux.
includes.h: Added glibc2 fixes for Linux.
quotas.c: Added OSF1 fix.
reply.c: Added fix from Ray Frush <frush@engr.colostate.edu> to fix
zero times for NT clients. Also added old client session keepalives.
Jeremy (jallison@whistle.com)

26 years agosmbclient.1: Added documentation of the username%password environment code.
Jeremy Allison [Fri, 19 Sep 1997 17:40:11 +0000 (17:40 +0000)]
smbclient.1: Added documentation of the username%password environment code.
smb.conf.5: Added 'username level' docs.
Jeremy (jallison@whistle.com)

26 years agoMakefile: Changed proto: target to not include c files not used currently.
Jeremy Allison [Fri, 19 Sep 1997 17:12:08 +0000 (17:12 +0000)]
Makefile: Changed proto: target to not include c files not used currently.
          Caused proto.h to be from a sorted list of C files.
arcfour.h: Added prototypes.
client.c: Added username%password in environment patch from John Blair <jdblair@frodo.tucc.uab.edu>
loadparm.c: Added username manipulation code from Peter McCool [SMTP:peter@qimr.edu.au]
username.c: Added username manipulation code from Peter McCool [SMTP:peter@qimr.edu.au]
mkproto.awk: Added arc4_key type.
proto.h: Updated & sorted.
Jeremy (jallison@whistle.com)

26 years agoAdded South American consultant.
Jeremy Allison [Fri, 19 Sep 1997 00:48:54 +0000 (00:48 +0000)]
Added South American consultant.

26 years agoAnother South American consultant.
Jeremy Allison [Fri, 19 Sep 1997 00:36:01 +0000 (00:36 +0000)]
Another South American consultant.

26 years agoAdded arcfour code needed for SMB password changing.
Jeremy Allison [Thu, 18 Sep 1997 19:56:57 +0000 (19:56 +0000)]
Added arcfour code needed for SMB password changing.
Jeremy (jallison@whistle.com)

26 years agoadded timestamp to "Denied connection" message.
Luke Leighton [Thu, 18 Sep 1997 12:47:55 +0000 (12:47 +0000)]
added timestamp to "Denied connection" message.

26 years agoadded some debug stuff
Andrew Tridgell [Thu, 18 Sep 1997 07:05:43 +0000 (07:05 +0000)]
added some debug stuff

26 years agoJohn asked the other day about using the tar feature in smbclient to
Andrew Tridgell [Thu, 18 Sep 1997 06:52:49 +0000 (06:52 +0000)]
John asked the other day about using the tar feature in smbclient to
handle file paths longer than 100 characters (the limit of the normal
tar format).

This patch adds support for producing GNU tar files (which have no
real limit on the path length) in smbclient.

Note that I have only added support for producing GNU tar files, I
haven't added support for accepting them when restoring. I thought I'd
leave that up to John :-)

26 years agoEnsuring malloced memory is bzero'd.
Jeremy Allison [Wed, 17 Sep 1997 17:08:00 +0000 (17:08 +0000)]
Ensuring malloced memory is bzero'd.
Jeremy (jallison@whistle.com)

26 years agoJHT ===> More hacks!
John Terpstra [Wed, 17 Sep 1997 14:54:35 +0000 (14:54 +0000)]
JHT ===> More hacks!

26 years agoJHT ===> Changed behaviour of logon script processing so that all macros
John Terpstra [Wed, 17 Sep 1997 13:53:59 +0000 (13:53 +0000)]
JHT ===> Changed behaviour of logon script processing so that all macros
         can be used in the logon script parameter definition in the smb.conf
         Globals section. This fixes a problem reported by Jacco de Leeuw
         where OS/2 does not see the %u variable. Jacco suggested using %U
         but we really do want the user for the netlogon share session.
         If this does not do the trick - well we eat our hat! Yeh!

26 years agoAdded documentation for the 'delete veto files' parameter.
Jeremy Allison [Wed, 17 Sep 1997 01:33:33 +0000 (01:33 +0000)]
Added documentation for the 'delete veto files' parameter.
Jeremy (jallison@whistle.com)

26 years agoAdded 'delete veto files' paremeter. Ugly - but the only
Jeremy Allison [Wed, 17 Sep 1997 01:29:53 +0000 (01:29 +0000)]
Added 'delete veto files' paremeter. Ugly - but the only
way to allow Samba client users to delete directories
containing Mac metafile information (.AppleDouble directories).

Needed for clean integration with netatalk.

Jeremy (jallison@whistle.com)

26 years agoFixing assumtions that malloced memory is zero filled - making
Jeremy Allison [Tue, 16 Sep 1997 17:40:17 +0000 (17:40 +0000)]
Fixing assumtions that malloced memory is zero filled - making
sure it is.
Jeremy (jallison@whistle.com)

26 years agochange the encryption instructions to reflect the fact that the code
Andrew Tridgell [Tue, 16 Sep 1997 08:31:01 +0000 (08:31 +0000)]
change the encryption instructions to reflect the fact that the code
is now built in

26 years agoadd a cast
Andrew Tridgell [Tue, 16 Sep 1997 08:26:33 +0000 (08:26 +0000)]
add a cast

26 years ago- change generate_challenge() to use md4 instead of des
Andrew Tridgell [Tue, 16 Sep 1997 04:41:16 +0000 (04:41 +0000)]
- change generate_challenge() to use md4 instead of des

- move routines about a bit between smbencrypt.c and smbdes.c. Ensure
that there is no entry point for normal DES operation

- add the following comment:

   This code is NOT a complete DES implementation. It implements only
   the minimum necessary for SMB authentication, as used by all SMB
   products (including every copy of Microsoft Windows95 ever sold)

   In particular, it can only do a unchained forward DES pass. This
   means it is not possible to use this code for encryption/decryption
   of data, instead it is only useful as a "hash" algorithm.

   There is no entry point into this code that allows normal DES operation.

   I believe this means that this code does not come under ITAR
   regulations but this is NOT a legal opinion. If you are concerned
   about the applicability of ITAR regulations to this code then you
   should confirm it for yourself (and maybe let me know if you come
   up with a different answer to the one above)

26 years agobug fix in the new des code.
Andrew Tridgell [Tue, 16 Sep 1997 03:53:54 +0000 (03:53 +0000)]
bug fix in the new des code.

I had one of the sbox[] constants wrong, which interestingly gave a
20% chance of the whole algorithm failing.

26 years agoKeep consultants in sync.
Jeremy Allison [Mon, 15 Sep 1997 20:02:20 +0000 (20:02 +0000)]
Keep consultants in sync.

26 years ago2 more consultants.
Jeremy Allison [Mon, 15 Sep 1997 20:01:35 +0000 (20:01 +0000)]
2 more consultants.

26 years agounbecome_domain_master and unbecome_logon_master were announcing
Luke Leighton [Mon, 15 Sep 1997 12:13:16 +0000 (12:13 +0000)]
unbecome_domain_master and unbecome_logon_master were announcing
as "dead".  removed this.

26 years ago- if the user already exists then ignore the -add command
Andrew Tridgell [Mon, 15 Sep 1997 06:36:55 +0000 (06:36 +0000)]
- if the user already exists then ignore the -add command

- change the way the smbpasswd file is auto-created if it doesn't
exist. It didn't work under IRIX for some unknown reason

The smbpasswd.c code is really a bit of a mess. We should probably
rewrite it sometime.

26 years ago- change a lot of occurances of errno to use strerror(errno). We can't
Andrew Tridgell [Mon, 15 Sep 1997 05:43:37 +0000 (05:43 +0000)]
- change a lot of occurances of errno to use strerror(errno). We can't
assume all our users are programmers :-)

- automatically create the smbpasswd file if it doesn't exist when
running smbpasswd.

26 years agorewrote md4.c from scratch. This implementation should be portable and
Andrew Tridgell [Mon, 15 Sep 1997 02:49:38 +0000 (02:49 +0000)]
rewrote md4.c from scratch. This implementation should be portable and
doesn't have any worries about RSA copyright.

26 years agono longer needed
Andrew Tridgell [Mon, 15 Sep 1997 02:47:59 +0000 (02:47 +0000)]
no longer needed

26 years agoThis commit does 3 main things:
Andrew Tridgell [Sun, 14 Sep 1997 16:37:18 +0000 (16:37 +0000)]
This commit does 3 main things:

1) put the encryption code in by default, with no #ifdef. It is still
disabled by default so you need to add "encrypt passwords = yes" in
smb.conf but at least all binaries will have it.

2) cleanup the kanji code so it compiles with no warnings

3) get rid of lots of uses of ugly non-portable C code. The main
offender being things like "register" but also remove uses of the
"const" keyword as there are compilers out there that don't support it
and even those that do often complain about its usage. Users don't
like warnings :-(

There is still some work to do. We need to replace the md4 code with
our own implementation. The current code (from rfc1186) is PD but is
not very portable. The new RFC (rfc1320) is more portable but adds
copyright restrictions. I'll do a from-scratch MD4 soon.

We also need to test that what I've implemented is portable. It should
be, but I'm too tired right now to test it on anything other than
intel linux.

26 years agoThis is a written from scratch DES implementation. I couldn't find a
Andrew Tridgell [Sun, 14 Sep 1997 16:19:49 +0000 (16:19 +0000)]
This is a written from scratch DES implementation. I couldn't find a
GPLd implementation so I decided to write one.

This version only does DES ecb encryption and isn't very general, so
it may in fact be exempt from ITAR regulations. ITAR regulations do
not prohibit the distribution of code that can be used for
authentication purposes only. This code has no decrypt function so it
would be useless for a normal encryption application and thus may be
ITAR exempt.

It is also very slow, but we don't need it to be fast. It is a literal
implementation from the standard and treats each bit as one byte to
make the code easy to write.

26 years agoFixed bug where user connecting with guest username and no
Jeremy Allison [Fri, 12 Sep 1997 16:31:51 +0000 (16:31 +0000)]
Fixed bug where user connecting with guest username and no
password was not being seen as guest. Bug was introduced
in previous patch.

Jeremy (jallison@whistle.com)

26 years agoAdded fix that means if connecting user sends guest account
Jeremy Allison [Fri, 12 Sep 1997 16:29:36 +0000 (16:29 +0000)]
Added fix that means if connecting user sends guest account
with no password they are seen as guest. Previous patch
broke this.

Jeremy (jallison@whistle.com)

26 years agocharcnv.c client.c clitar.c kanji.c kanji.h loadparm.c
Jeremy Allison [Thu, 11 Sep 1997 20:17:32 +0000 (20:17 +0000)]
charcnv.c client.c clitar.c kanji.c kanji.h loadparm.c
mangle.c smb.h util.c:

  Big merge to allow KANJI support to be in the main
binary without explicitly compiling with it.

locking.c: Fix for smbstatus not being able to read files.
namepacket.c: Removed unneccesary debug statement.
trans2.c: Added Luke's proposed fix (ifdefed out until further testing).
nmblookup.c: Fixed bug where query fails and status is done on bogus IP.

Jeremy (jallison@whistle.com)

26 years agofix a couple of "declaration shadows previous local" warnings.
Andrew Tridgell [Thu, 11 Sep 1997 02:30:00 +0000 (02:30 +0000)]
fix a couple of "declaration shadows previous local" warnings.

26 years agoprototype updates for new functions
Andrew Tridgell [Thu, 11 Sep 1997 02:19:35 +0000 (02:19 +0000)]
prototype updates for new functions

26 years agoadd the stdout parameter to lp_dump()
Andrew Tridgell [Thu, 11 Sep 1997 02:19:23 +0000 (02:19 +0000)]
add the stdout parameter to lp_dump()

26 years agosome minor modifications to loadparm.c to support the necessary
Andrew Tridgell [Thu, 11 Sep 1997 02:19:04 +0000 (02:19 +0000)]
some minor modifications to loadparm.c to support the necessary
functions for wsmbconf. In particular added some more support routines
(like lp_rename_service()) and make the dump routines take a FILE
pointer rather than assuming stdout

26 years agocgi.c is a simple set of CGI manipulation routines
Andrew Tridgell [Thu, 11 Sep 1997 02:17:16 +0000 (02:17 +0000)]
cgi.c is a simple set of CGI manipulation routines

wsmbconf.c is a rudimentary web based smb.conf editor. Its really
there just to demonstrate how such an editor can hook into loadparm.c,
I don't expect anyone to actually use it as is.

wsmbstatus.c is a simple web based smbstatus. Its probably broken.

26 years agolocking.c: Fix to make slow share mode file 0666 instead of 0644. Stoped
Jeremy Allison [Thu, 11 Sep 1997 00:19:26 +0000 (00:19 +0000)]
locking.c: Fix to make slow share mode file 0666 instead of 0644. Stoped
smbstatus from reporting correct locks.
nameelect.c: Luke's fix for elections.
namepacket.c: Removed iritating error message.
nmblookup.c: Fixed bug where status request went to random IP address.
reply.c: Changed NTFS to SAMBA in filename string.
Jeremy (jallison@whistle.com)

26 years agoAdded one more consultant.
Jeremy Allison [Wed, 10 Sep 1997 22:36:50 +0000 (22:36 +0000)]
Added one more consultant.

26 years agoupdated bit on kill -HUP to make it clear what effect this has, and its
Luke Leighton [Tue, 9 Sep 1997 13:06:55 +0000 (13:06 +0000)]
updated bit on kill -HUP to make it clear what effect this has, and its
limitations.

26 years agosamba servers forcing local elections if they are not a local master.
Luke Leighton [Sun, 7 Sep 1997 17:26:26 +0000 (17:26 +0000)]
samba servers forcing local elections if they are not a local 
added check for "preferred master" to ensure not forcing an election.

26 years agoJHT ===> Just setting version to 1.9.18alpha1
John Terpstra [Fri, 5 Sep 1997 22:18:16 +0000 (22:18 +0000)]
JHT ===> Just setting version to 1.9.18alpha1

26 years agoclient.c:
Jeremy Allison [Fri, 5 Sep 1997 21:49:07 +0000 (21:49 +0000)]
client.c:
status.c: Ensure that myhostname is set so that substitutions work.
server.c: Sync up with main branch.
Jermey (jallison@whistle.com)

26 years agoclient.c: Made sure myhostname was initialised before substitutions.
Jeremy Allison [Fri, 5 Sep 1997 21:32:32 +0000 (21:32 +0000)]
client.c: Made sure myhostname was initialised before substitutions.
status.c: Made sure myhostname was initialised before substitutions.
server.c
trans2.c: Moved OS/2 WPS fix.
Jeremy (jallison@whistle.com)

26 years agoBringing 1.9.17 patch tree up to date for documentation.
Jeremy Allison [Fri, 5 Sep 1997 20:40:34 +0000 (20:40 +0000)]
Bringing 1.9.17 patch tree up to date for documentation.
Preparing to release 1.9.17p1.
Jeremy (jallison@whistle.com)

26 years agoOne more consultant.
Jeremy Allison [Fri, 5 Sep 1997 19:54:51 +0000 (19:54 +0000)]
One more consultant.

26 years agoUpdated code on 1.9.17 branch to add bug fixes. This
Jeremy Allison [Fri, 5 Sep 1997 19:44:48 +0000 (19:44 +0000)]
Updated code on 1.9.17 branch to add bug fixes. This
is *NOT* the same branch as the main (ie. 1.9.18)
branch.
Jeremy (jallison@whistle.com)