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

1918 Commits

Author SHA1 Message Date
Richard Sharpe
e1d962659f Now have a better solution to the need to have smblcient find
a WINS server if running on the WINS server.  As suggested by
Andrew, we have a flag, in_client=False by default, and set it
to True in the client.  loadparam.c checks this and sets
szWINSserver to 127.0.0.1 when in_client && bWINSsupport.

BTW, we seem to have picked up and unused value in some of
Luke's new code.
(This used to be commit b665756bfc)
1998-09-29 04:43:40 +00:00
Andrew Tridgell
a97a4b8b99 made bad boolean values stand out a little better
(This used to be commit 270f4b0f84)
1998-09-28 12:52:51 +00:00
Richard Sharpe
376742415b Backed out that just as ill-considered change :-(
A more careful change will be needed in the name lookup code.
(This used to be commit edfc3ab99b)
1998-09-28 09:40:46 +00:00
Richard Sharpe
c8c89585a3 The previous fix for WINS on the WINS server was wrong. It
caused nmbd to exit :-(

We now set the variable szWINSserver after the smb.conf file
has been processed, but only of we are a WINS server.
(This used to be commit 17212991cf)
1998-09-28 09:22:06 +00:00
Richard Sharpe
2d87954bc0 Make sure that WINS Server = 127.0.0.1 in case we
do not set a value in smb.conf.

This will be the case if we are a WINS server, or if
we don't know what we are doing.

The result is that smbclient can access a WINS server if it
is running on the same machine as the WINS server
(This used to be commit a343998666)
1998-09-28 08:00:07 +00:00
Alexandre Oliva
cf971f88ac automated generation of .dummy files for each subdirectory;
dummy.in files are no longer needed, and new directories will be taken
care of automatically, at configure (or config.status --recheck) time
(This used to be commit 237a8e5fe6)
1998-09-28 00:14:36 +00:00
Jeremy Allison
aab2fe0216 First cut at kernel oplocks. This should have no effect unless runnin
on a machine that supports them in autoconf.

Move various functions out of lib/util.c into smbd/process.c
and smbd/oplock.c where they belong.

Jeremy.
(This used to be commit c3c5e13f85)
1998-09-23 01:48:45 +00:00
Alexandre Oliva
e649750cb4 major autoconf clean-up
fix problems in builds with srcdir!=builddir
(This used to be commit 1ffc3b807a)
1998-09-21 09:07:08 +00:00
Andrew Tridgell
93dfc79888 added a per-share parameter "fstype" that allows you to select the
filesystem type that will be reported to the client. If unspecified
then it defaults to FSTYPE_STRING (currently "Samba").

This is useful for cdroms where you want to set the fs type to CDFS.
(This used to be commit 4332e2c93d)
1998-09-20 15:40:52 +00:00
Jeremy Allison
184db9266e configure configure.in include/config.h.in include/includes.h
Fixed bugs in readline autoconf.

param/loadparm.c smbd/open.c smbd/oplock.c: Started on kernel oplock
        code - checking forced by above issue. Should not be used
        currently.

Jeremy.
(This used to be commit f939efac9e)
1998-09-18 17:50:18 +00:00
Jeremy Allison
b8b67f4fab configure configure.in: Added checks for statvfs64. Last bit of 64 bit widening (I hope :-).
include/config.h.in: Added #undef STAT_STATVFS64.
include/includes.h: Added SMB_STRUCT_STATVFS type, Changed SMB_BIG_INTEGER to
                    SMB_BIG_UINT and SMB_BIG_INT types.
include/smb.h: Added flag defines from CIFS spec.
lib/debug.c: Fixed one more mode_t issue.
lib/system.c: Added sys_statvfs wrapper.
lib/util.c: Changed trim_string to use size_t.
param/loadparm.c: Moved "blocking locks" into locking section. Alphabetised
                  locking options. Question - shuld we do this for all options ?
passdb/ldap.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT.
passdb/nispass.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT.
passdb/smbpass.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT.
smbd/dfree.c: Changed to use 64 bit types if available. Moved to use unsigned
              types.
smbd/dosmode.c: Fixed one more mode_t issue.
smbd/negprot.c: Changed literals to be FLAG_ #defines.
smbd/nttrans.c: Removed dead code.
smbd/open.c: Changed disk_free call.
smbd/process.c: Changed literals to be FLAG_ #defines.
smbd/reply.c: Changed disk_free call.
smbd/trans2.c: Fixed but in SMB_QUERY_FS_VOLUME_INFO call. Was using
               UNICODE - should use ascii.
tests/summary.c: Added STAT_STATVFS64 check.
Jeremy.
(This used to be commit c512b1b91f)
1998-09-17 23:06:57 +00:00
Jeremy Allison
ac9b687cc2 configure configure.in: Added tests for fseek64 and ftell64.
config.h.in: Added fseek64 and ftell64.
includes.h: Added definition of SMB_BIG_INTEGER.
smb.h: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER.
access.c: Tidyup of dbug statement.
system.c: Added sys_fseek and sys_ftell. Changed mode calls to use mode_t.
asyncdns.c: Tidyup of comment.
loadparm.c: Tidyup of set_default_server_announce_type() function definition.
ldap.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER.
nispass.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER.
smbpass.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER.
smbpassfile.c: Use sys_fseek().
chgpasswd.c: Tidyup of debug statement.
dosmode.c: Changed mode calls to use mode_t.
ipc.c: Removal of dead code.
nttrans.c: Changed mode calls to use mode_t.
open.c: Changed mode calls to use mode_t.
pipes.c: Removal of dead code.
reply.c: Removal of dead code.
trans2.c: Removal of dead code. Changed mode calls to use mode_t.
Jeremy.
(This used to be commit c381d32e3d)
1998-09-17 19:16:12 +00:00
Jeremy Allison
6e0c276ec8 Added back groupname map stuff removed by Andrew's "slash 'n' burn"
tactics :-). Protected by #ifdef until used.

Fixed bug in fd_attempt_close() where a pointer to potentially
free'd memory was returned. I hate that.

Added "blocking locks" as a per-share option for performance testing.

Changed is_mangled() so it will return true if called with a pathname
and any component of the pathname was mangled (it was already attempting
to do this, but not checking for a '/' as end-of-mangle).

This should be a better fix for the wierd stat cache bug Andrew identified.

Jeremy.
(This used to be commit 0de01f4598)
1998-09-08 19:21:04 +00:00
Andrew Tridgell
4fc5a74ffa add a "stat cache" boolean smb.conf option. (defaults to on)
I think we need this so we can rule out stat cache bugs when dealing
with bug reports. If we ask a user to disable the stat cache and the
problem persists then we know it isn't a stat cache bug. The stat
cache code is sufficiently complicated that it can be pretty hard to
tell if it is causing problems or not.
(This used to be commit c83f3775cd)
1998-09-06 01:37:14 +00:00
Andrew Tridgell
e9ea36e4d2 tridge the destroyer returns!
prompted by the interpret_security() dead code that Jean-Francois
pointed out I added a make target "finddead" that finds potentially
dead (ie. unused) code. It spat out 304 function names ...

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

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

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

One bit I didn't do is the ubibt code. Chris, can you look at that?
Heaps of unused functions there. Can they be made static?
(This used to be commit 2204475c87)
1998-09-05 05:07:05 +00:00
Jeremy Allison
98f524bde4 Bugfix for leak in reference counted file struct.
Added "nt smb support" parameter to allow NT SMB's to be turned off.
Jeremy.
(This used to be commit 63f65f5027)
1998-09-05 03:14:40 +00:00
Jeremy Allison
38142a1ebb This checking fixes the statcache bug that stopped NetBench from running
correctly. Added new parameter "stat cache size" - set to 50 by default.

I now declare the statcache code officially "open" for business :-).
It gets a hit rate of 97% with a NetBench run and seems to make
using a case insensitive run as efficient as a case sensitive run.

Also tidied up our sys_select usage - added a maxfd parameter and
also added an implementation of select in terms of poll(), for systems
where poll() is much faster. This is disabled by default.

Jeremy.
(This used to be commit 779b924ec1)
1998-08-28 21:46:29 +00:00
Andrew Tridgell
7bc68de378 added a warning when loading a parameter that is deprecated
(This used to be commit c8b0041570)
1998-08-26 01:57:17 +00:00
Andrew Tridgell
2c065107b1 changed the default permissions code to do this:
if ((sbuf->st_mode & S_IWUSR) == 0)
      result |= aRONLY;

rather than the very complex user/group permissions checks we do
currently. This is equivalent ot setting "alternate permissions = yes"
in the old code. The change is motivated by three main reasons:

1) it's basically impossible to second guess whether a file is
writeable without trying to open it for writing. ACLs, root squash etc
just make it too hard.

2) setting it not RONLY if the owner can write is closer to what NT
does (eg. look at a cdrom - files are not marked read only).

3) it prevents the silly problem of copying files from a read only
share to a writeable share and then finding you can't write to them as
windows preserves the RONLY flag. Lots of people get bitten by this
when they drag a folder from a Samba drive. It also hurts some install
programs.

I have also added a new flag type for loadparm.c called
FLAG_DEPRECATED which I've set for "alternate permissions". I'll soon
add code to testparm to give a warning about deprecated options.
(This used to be commit c4363a12fd)
1998-08-25 06:40:42 +00:00
Jeremy Allison
8afc9c80ac Changed ASSERT macros to SMB_ASSERT macros as some systems already
have an ASSERT macro defined.
Jeremy.
(This used to be commit dbe6ad014a)
1998-08-24 21:49:10 +00:00
Andrew Tridgell
038e3433d3 added new smb.conf option "panic action". see my samba-technical
explanation.
(This used to be commit c6899df44c)
1998-08-21 11:37:40 +00:00
Andrew Tridgell
b9623ab59e this is the bug change to using connection_struct* instead of cnum.
Connections[] is now a local array in server.c

I might have broken something with this change. In particular the
oplock code is suspect and some .dll files aren't being oplocked when
I expected them to be. I'll look at it after I've got some sleep.
(This used to be commit c7ee025ead)
1998-08-14 17:38:29 +00:00
Andrew Tridgell
bad66abfe7 moved username.c into lib/ so we no longer $(PASSDB_OBJ) in most
utilities
(This used to be commit 745d38bfe7)
1998-08-10 05:22:10 +00:00
Andrew Tridgell
87bcd5502c added ignore rules for the dummy files
(This used to be commit 687f76a17d)
1998-08-09 11:25:49 +00:00
Andrew Tridgell
27ff18a184 these dummy files are needed for autoconf processing
(This used to be commit be762dc3de)
1998-08-09 11:24:15 +00:00
Andrew Tridgell
963e96f3a9 added --with-nisplus-home option
(This used to be commit 70000c2190)
1998-08-08 01:15:14 +00:00
Jeremy Allison
c0c057c0df loadparm.c: Added "debug timestamp" synonym for Chris.
nttrans.c: Moved common code into function in server.c
           Removed left over debug level 0.
server.c: Moved common code into function in server.c
Jeremy.
(This used to be commit 34ef55b722)
1998-08-04 01:01:26 +00:00
Christopher R. Hertel
31c09de03c More formatting changes. Mostly converted some DEBUG() calls to DEBUGADD()
so that we wouldn't get too many timestamps.

Chris -)-----
(This used to be commit 3e7e5fad37)
1998-08-03 22:10:53 +00:00
Jeremy Allison
7448091da6 First implementation of ChangeNotify - this version only checks
for changes in the directory modify timestamps. A better version
will look at the requested client flags, and create a hash that
represents the current state of the directory, and check against
this instead.
debug.c: Added lp_timestamp_logs() function.
loadparm.c: Added "change notify timeout" in seconds (default 60)
- this is the scan rate for a directory.
            Added ""timestamp logs" boolean - default True. Turns
off log timestamps (so I can read them :-).
nttrans.c: ChangeNotify implementation.
server.c: ChangeNotify implementation.
shmem_sysv.c: Added exits on shmem errors (without them smbd can
              core dump if some calls fail).
smb.h: Added ChangeNotify flags for future use.
util.c: Tidied up typedef.
Jeremy.
(This used to be commit a0748c3f53)
1998-08-03 19:07:55 +00:00
Christopher R. Hertel
f1abfacd4d I finished removing timestring() calls from DEBUG() messages. Also went
through and changed some DEBUG() calls to DEBUGADD() to combine output
under a single timestamp.  There were too many timestamps.

Note that Jeremy has told me that he's working on adding a config parameter
to turn timestamps off.  Cool.

Chris -)-----
(This used to be commit 247dbc9a24)
1998-08-03 18:13:13 +00:00
Jeremy Allison
7284bb5ca0 Makefile.in: Moved UBIQX stuff into UTILOBJ.
loadparm.c: Added "ole locking compatibility" option (default "true").
locking.c: Changes to implement union in files_struct.
locking_shm.c: Changes to implement union in files_struct.
nttrans.c: Made opening a directory explicit (we have to).
           Added create directory code for nttrans.
reply.c: Changes to implement union in files_struct.
server.c: Changes to implement union in files_struct. Added create directory code.
trans2.c: Changes to implement union in files_struct.
smb.h: Changes to implement union in files_struct.
util.c: Changed linked list code to UNIQX linked list. This will make
        the other lists I need to implement for ChangeNotify and blocking
        locks easier.
Jeremy.
(This used to be commit 3a5eea850b)
1998-07-30 21:18:57 +00:00
Andrew Tridgell
64578c0589 merge from the autoconf2 branch to the main branch
(This used to be commit 3bda7ac417)
1998-07-29 03:08:05 +00:00
Jeremy Allison
7abcd0521e loadparm.c: Added strict sync parameter.
locking.c: Added code to deal with real open mode of file.
reply.c: Added strict sync parameter.
server.c: Added strict sync parameter. Fixed open modes.
Jeremy.
(This used to be commit ed57b603b5)
1998-07-28 18:15:31 +00:00
Jeremy Allison
f1cd3cb54c Makefile: Added CC=gcc to DGUX on Intel. Comment from ross@filmworks.com.
ipc.c:
loadparm.c:
printing.c:
           Added code from <Dirk.DeWachter@rug.ac.be> to implement print
           queue pausing. New parameters are "queuepause command" and
           "queueresume command".
util.c: Added fix for mount options in autmount map.
lib/rpc/include/rpc_misc.h: Removed duplicate pipe names for Jean-Francois.
Jeremy.
(This used to be commit 559a9bf2bb)
1998-07-16 00:06:29 +00:00
Jeremy Allison
59d07445b6 loadparm.c:
With apologies to Charlton Heston and Pierre Boule.

    "You damn fools, you finally did it".

    Changed default security mode to be security=user.
    Yes this is a big (although small in code) change.
    It's something we've been discussing for a while, to
    finally wean people off the legacy security=share mode
    which is *never* what you want.

    Jeremy.

nmbd_incomingrequests.c: Bug fix for nmbd core dumps caused by overrun.
                         Found by <samuel@public.szonline.net>.
nttrans.c: More NT smb stuff.
reply.c: Unlink will overwrite an existing file. Well you learn
         something new about POSIX every day. :-).
server.c: Tidyup unreadable code.
smbpasswd.c: Code to allow -U remote_username to allow ordinary
             users to change remote passwords if their NT username
             is different from their UNIX username.
             Patch from <torbjorn.lindh@allgon.se>.

Jeremy.
(This used to be commit 4eccb47cfb)
1998-07-14 21:23:59 +00:00
Jeremy Allison
bbd7ca65e7 clientgen: Added USE_SSL for client shutdown.
clitar.c: Added 'Samba style' comments before string_create_s().
loadparm.c: Fixed missing comma in SSL code.
util.c: Removed string_create_s(). Currently it's only called from
        clitar.c and having it here as well as a static in clitar
        causes the compile to break (Richard, please decide where
        you want this function).
lib/rpc/parse/parse_net.c: Fix from <anders.blomdell@control.lth.se>
                           to stop coredump on missing parameter.
Jeremy.
(This used to be commit d23b443225)
1998-06-16 18:25:36 +00:00
Jeremy Allison
cb757820f5 Added SSL support from Christian Starkjohann <cs@obdev.at>
This patch may not yet compile with -DUSE_SSL enabled, further
Makefile changes may be needed. But it was important to get
this code in place before I go off to USENIX.
Jeremy.
(This used to be commit 31e768369f)
1998-06-16 01:35:52 +00:00
Jeremy Allison
5b5eb35c91 Makefile: Added ubi_sLinkList.o as the groupname.o file needs it. Added groupname.o
includes.h: Added ubi_sLinkList.h include.
loadparm.c: Added groupname map parameter.
password.c: Fix HPUX big_crypt.
username.c: New user_in_list() code. Moved groupname map code to groupname.c
lib/rpc/server/srv_util.c: Added lookup_wellknown_sid_from_name().

New groupname map stuff. Note that nothing currently uses this but at
compiles ok.

Jeremy.
(This used to be commit beef636a4d)
1998-06-13 03:04:00 +00:00
Jeremy Allison
e85295d924 loadparm.c: Removed 'domain other sids' parameter.
lib/rpc/include/rpc_lsa.h: Changed #defines for RPC calls - moved some, made LSA_LOOKUPNAMES correct.
lib/rpc/include/rpc_misc.h: Changed DOMAIN_ALIAS_xxx to BUILTIN_ALIAS_xxx.
                            Changed bitmasks for uid to rid to be 1 bit.
lib/rpc/parse/parse_misc.c: Changed make_unistr2 to put length as given, max length as one more.
lib/rpc/server/srv_netlog.c: Removed 'domain other sids' parameter.
lib/rpc/server/srv_samr.c: Changed DOMAIN_ALIAS_xxx to BUILTIN_ALIAS_xxx.
lib/rpc/server/srv_util.c: Changed DOMAIN_ALIAS_xxx to BUILTIN_ALIAS_xxx.
Jeremy.
(This used to be commit 34c91840a3)
1998-06-09 02:26:26 +00:00
Jeremy Allison
88d88f5d0d loadparm.c: Did it ! Changed defaults for 'case preserve' and 'short case preserve'.
Also removed 'domain allow/deny' parameters.
shmem_sysv.c: Added strerror code so I can see why sysV calls are failing.
lib/rpc/server/srv_netlog.c: Removed code that used 'domain allow/deny' parameters -
                             replaced with a comment so I will remember to fix this later.
Jeremy.
(This used to be commit 5f46c7c4b1)
1998-06-05 20:46:05 +00:00
Luke Leighton
59e2992139 added "domain admin group" and "domain guest group" parameters. this is
because "domain admin users" and "domain guest users" was overloaded.

incorrectly.
(This used to be commit 04b8240072)
1998-06-04 15:24:20 +00:00
Jeremy Allison
9bd7e1e887 loadparm.c: Added machine password timeout parameter - set to 7 days be default.
password.c: Added code to tell server.c when machine password needs changing.
server.c: Change machine password in idle cycles if it needs it.
smbpassfile.c: Fixed up length calculations for machine password file.
smbpasswd.c: Moved domain joining code/machine password changing code.
lib/rpc/client/cli_netlogon.c: And this is where it now lives.
Jeremy.
(This used to be commit b8fedca619)
1998-05-27 00:30:52 +00:00
Jeremy Allison
ffab54750f chgpasswd.c: Changed back to getsmb... from getsam...
ldap.c: Stoped dummy_function being prototyped.
loadparm.c: Fixed slprintf sizes.
nisppass.c: Fixed safe_strcpy sizes.
nmbd_processlogon.c: Changed back to getsmb... from getsam...
nttrans.c: Just a dump of new code.
passdb.c: Moved stuff around a lot - stopped any lookups by rid. This
          needs to be indirected through a function table (soon).
password.c: Changed back to getsmb... from getsam...
reply.c: Changed back to getsmb... from getsam...
slprintf.c: Fixed prototype problems.
smb.h: Fixed prototype problems.
smbpass.c: Changed to getsmbfile....
smbpasswd.c: Changed back to getsmb... from getsam...
lib/rpc/server/srv_netlog.c: Changed back to getsmb... from getsam...
lib/rpc/server/srv_samr.c: Fixed rid lookup - use uid or gid lookup.
lib/rpc/server/srv_util.c: Changed back to getsmb... from getsam...
Jeremy.
(This used to be commit 7d332b2493)
1998-05-18 21:30:57 +00:00
Luke Leighton
32954eb9e9 Makefile:
- added nisppass.c and NISPLUS_FLAGS

includes.h:

	- renamed USE_LDAP to USE_LDAP_DB.  renamed NISPLUS to USE_NISPLUS_DB.
	added default define of USE_SMBPASS_DB.

	- removed ldap headers: they are local only to ldap.c

ldap.c :

	- made all ldap-specific functions static.

	- added dummy sam21 functions

loadparm.c :

	- renamed NISPLUS to NISPLUS_HOME


mkproto.awk

	- commented out ldap-specific #ifdef generation code: it's not
	  needed now that ldap-specific functions in ldap.c are static

nisppass.c :

	- first attempt at an add function from
(This used to be commit f215d375f0)
1998-05-18 11:54:00 +00:00
Luke Leighton
d48e8376f1 removed lp_domain_workstation() parameter
(This used to be commit 80d6a3bb0c)
1998-05-12 14:04:46 +00:00
Jeremy Allison
f888868f46 This is a security audit change of the main source.
It removed all ocurrences of the following functions :

sprintf
strcpy
strcat

The replacements are slprintf, safe_strcpy and safe_strcat.

It should not be possible to use code in Samba that uses
sprintf, strcpy or strcat, only the safe_equivalents.

Once Andrew has fixed the slprintf implementation then
this code will be moved back to the 1.9.18 code stream.

Jeremy.
(This used to be commit 2d77445400)
1998-05-12 00:55:32 +00:00
Luke Leighton
0518067c6e 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 6b2f9ea68f)
1998-05-11 17:34:39 +00:00
Andrew Tridgell
3dfc0c8472 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 ee09e9dadb)
1998-05-11 06:38:36 +00:00
Herb Lewis
4c136581dc added FLAG_BASIC to some browse options for swat.
(This used to be commit ce1af10ab4)
1998-05-08 01:41:27 +00:00
Jeremy Allison
01df1ed95f 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 1fd8d12ca4)
1998-05-07 19:04:14 +00:00
Jeremy Allison
b54509045d 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 446b98ca07)
1998-05-06 18:14:02 +00:00
Luke Leighton
5fa8775d97 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 ad9ba0a1cb)
1998-05-06 17:43:44 +00:00
Jeremy Allison
19f76f391b 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 567d3f8389)
1998-05-05 19:24:32 +00:00
Jeremy Allison
3eae1e3f8e 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 5d3e874d78)
1998-04-30 01:39:22 +00:00
Jeremy Allison
90177708aa 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 6a7164233e)
1998-04-29 22:27:26 +00:00
Jeremy Allison
d3832506b2 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 17b94a7084)
1998-04-29 00:02:57 +00:00
Jeremy Allison
e7ac86607c 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 866406bfe3)
1998-04-25 01:12:08 +00:00
Jeremy Allison
8584c6bd66 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 e6bda112eb)
1998-04-22 00:56:38 +00:00
Jeremy Allison
6babe8da07 Added 'passwd chat debug' parameter to allow admins to debug their
Samba passwd chat scripts.
Jeremy.
(This used to be commit 5a995f4f75)
1998-04-20 23:07:28 +00:00
Jeremy Allison
cac6a060af 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 cd2613c572)
1998-04-13 19:24:06 +00:00
Jeremy Allison
af80d8e98f Makefile, loadparm.c, server.c, smb.h, util.c: Patch from
stn@techfak.uni-kiel.de (Stefan Nehlsen) to get homes from
the NIS+ map.
smbpasswd.c: Tidy up of cli_state structure.
Jeremy.
(This used to be commit fc2295e0f5)
1998-04-09 20:48:48 +00:00
Jeremy Allison
724cab4d08 loadparm.c: Cause IPC$ comment to be evaluated at runtime, rather than
load time (patch from "Marty Leisner" <leisner@sdsp.mc.xerox.com>.
server.c: Patch from Josef Hinteregger <joehtg@joehtg.co.at> - string
could be overwritten when find_service() called recursively.
Jeremy.
(This used to be commit cf15b3bd74)
1998-04-06 18:14:56 +00:00
Jeremy Allison
f9c698b5eb Fix from Josef Hinteregger <joehtg@joehtg.co.at> for using
character set = iso8859-1 with the new multibyte char code.
Was always using sj_to_sj conversion in error.
Jeremy.
(This used to be commit e6a083451f)
1998-04-03 01:04:34 +00:00
Jeremy Allison
612cbb6a60 Patch from Chris Maltby <chris@softway.com.au>. His comments follow:
+ improvement to smbtar to allow exclusion/inclusion of system and
    hidden files, and to generate a listing of what has been archived
    in a format useful for automated backup systems.

  + add the "Softq" spooling system to samba's printing capabilities.

  + I have "fixed" the intrusion of US style dates into samba reporting
    as well. The format yyyy/mm/dd is not only uunambiguous, but also
    has the benefit of making lexicographic sorts work correctly.

Jeremy.
(This used to be commit f9dacd1d8b)
1998-04-02 01:01:24 +00:00
Jeremy Allison
a4156f9b50 chgpasswd.c, ipc.c, loadparm.c: Added boolean "unix password sync"
parameter which allows the new change password code to change the
unix password also. Defaults to OFF.
includes.h: Added termios.h to FreeBSD to allow password changing.
namequery.c: Fixed missing name parameters to debug statements.
Jeremy.
(This used to be commit 4ac50c0f0a)
1998-03-27 19:59:14 +00:00
Andrew Tridgell
e12cb8b610 oops, I got the sense of the show_defaults parameter to lp_dump()
wrong.
(This used to be commit b92c3b13d7)
1998-03-17 14:46:17 +00:00
Andrew Tridgell
59d7006b05 - added "Full View"/"Normal View" on the "view config" page
- added the ability to auto-refresh the status page. There is a
  problem with this (it can kill inetd!). Hopefully we can fix that.
(This used to be commit 4488d8932f)
1998-03-17 11:44:16 +00:00
Jeremy Allison
c54af0f8b2 Adding the same change as was added to 1.9.18 branch to add the
"name resolve order" parameter.

source/Makefile: Re-ordered link for name resolve order code.
source/clientgen.c:
source/clientutil.c: Added calls to resolve_name().
source/includes.h: Added HPUX zombie fix.
source/loadparm.c: Added new name resolve order parameter.
source/namequery.c: Re-wrote to include parsing of lmhosts file, new resolve_name()
                    function requested by John.
source/nmbd.c: Tell resolve_name not to do WINS lookups if we are the WINS server.
source/nmbd_lmhosts.c: Call lmhosts parsing functions in namequery.c
source/password.c: Call resolve_name() to lookup security=server name.

source/reply.c:
source/time.c:
source/trans2.c: "fake directory create times" fix from Jim Hague - hague@research.canon.com.au.
source/util.c: Removed isalnum() test in Get_Hostname() that seems to cause
               problems on many systems.

Jeremy.
(This used to be commit 7f118970da)
1998-03-16 20:59:47 +00:00
Andrew Tridgell
c4855a8e02 changed the default "keepalive" value to 300 seconds.
This is more important now that oplocks are being used.
(This used to be commit 7bccd2c360)
1998-03-16 07:23:51 +00:00
Andrew Tridgell
e2b50d04ad if a local parameter is changed at the global level then propogate the
change to all shares that are currently set to the default value.
(This used to be commit b0e1183b2c)
1998-03-14 11:24:01 +00:00
Andrew Tridgell
b85346942e another makeover of loadparm to support new stuff in swat and
testparm.

In particular I added:

- ability to optionally save default values of all parameters when
  calling lp_load(). This can then be used to save only non-default
  parameters in lp_dump(). This makes the saved smb.conf (and viewed
  parameters in testparm) much shorter

- ability to not load ipc share in lp_load()

- separators in parm_table[] so parameters can be grouped logically.

- flag to mark parameters that are local but which should be also
  viewed as global as far as parameters editing is concerned
(This used to be commit f9af35da26)
1998-03-14 08:27:41 +00:00
Andrew Tridgell
2207cdd60c remove an unnecessary #ifdef
(This used to be commit dfaa576d7e)
1998-03-14 00:48:40 +00:00
Andrew Tridgell
e8abdf4ac4 add FLAG_HIDE to "config file" option (so it can't be set in swat)
(This used to be commit f9f9fe67c7)
1998-03-12 02:16:23 +00:00
Jeremy Allison
fdeea341ed "For I have laboured mightily on Luke's code, and hath broken
all I saw" - the book of Jeremy, chapter 1 :-).

So here is the mega-merge of the NTDOM branch server code.
It doesn't include the new client side pieces, we'll look
at that later.

This should give the same functionality, server wise, as
the NTDOM branch does, only merged into the main branch.

Any fixes to domain controler functionality should be
added to the main branch, not the NTDOM branch.

This code compiles without warnings on gcc2.8, but will
need further testing before we are sure all the working
functionality of the NTDOM server branch has been
correctly carried over.

I hereby declare the server side of the NTDOM branch
dead (and all who sail in her :-).

Jeremy.
(This used to be commit 118ba4d77a)
1998-03-11 21:11:04 +00:00
Andrew Tridgell
35d67dd80a Jeremy is going to hate me ...
These are some hacks on SWAT. Maybe users will actually be able to
work out how to use it now.

Unfortunately these changes required some editing in loadparm.c and
smb.h which will make Jeremys merge job harder. Sorry!
(This used to be commit 674c88a6bf)
1998-03-08 14:14:49 +00:00
Jeremy Allison
b7fb6c6b38 Change the multibyte character set support so that
Kanji support is one case of multibyte character
support, rather than being a specific case in
single byte character support.

This allows us to add Big5 Chinese support (code page 950)
and Korean Hangul support (code page 949) at very little
cost. Also allows us to easily add future multibyte
code pages.

Makefile: Added codepages 949, 950 as we now support more multibyte
codepages.
asyncdns.c: Fixed problem with child being re-spawned when parent killed.
charcnv.c
charset.c
client.c
clitar.c
kanji.c
kanji.h
smb.h
util.c
loadparm.c: Generic multibyte codepage support (adding Big5 Chinese
            and Korean Hangul).
nmbd.c: Fixed problem with child being re-spawned when parent killed.
mangle.c: Modified str_checksum so that first 15 characters have more
          effect on outcome. This helps with short name mangling as
          most 'long' names are still shorter than 15 chars (bug was
          foobar_mng and foobar_sum would hash to the same value, with
          the modified code they hash differently.
Jeremy.
(This used to be commit 299016338c)
1998-03-03 20:19:14 +00:00
Jeremy Allison
2beada804a Ding-dong the witch is dead, the witch is dead......
This is the checkin that fixes the infamous Visual C++ 'file
has changed' bug.
I feel *SO* good about that :-).
charset.c: Added (void) to fix Herb's fussy compiler.
loadparm.c: Removed "win95 bug compatibility" (didn't
            like it much anyway :-). Added "dos filetime resolution"
            instead.
reply.c: Added the 2 second timestamp resolution fix that the song above is about.
time.c: Removed unneeded get_access_time() function.
trans2.c : Removed unneeded "win95 bug compatibility" code.
Jeremy.
(This used to be commit 10d628e4ae)
1998-02-13 07:11:58 +00:00
Jeremy Allison
99e11e171e Makefile: Added AIX 3.2.5.
loadparm.c: Added "win95 bug compatibility" parameter.
local.h: Replaced MAX_OPEN_FILES back to 100 from 10 (oops).
reply.c: Fixed ulogoff check against uid - changed to vuid.
server.c: Changed file struct save of uid - changed to vuid.
smb.h: Changed id in struct current_user to vuid.
       Changed file struct uid to vuid.
time.c: Added "win95 bug compatibility" atime -> mtime return.
trans2.c: Added "win95 bug compatibility" fixes.
uid.c: Changed id in struct current_user to vuid - added checks
       to set/reset it.
util.c: Added code to expand environment variables.
version.h : still at 1.9.18 (head branch doesn't matter too much at present).
Jeremy.
(This used to be commit adc903bcf5)
1998-02-11 11:07:14 +00:00
Jeremy Allison
5546e28e69 A small raft of changes, I will sync up with 1.9.18 also.
chgpasswd.c: Fixed typo in debug message.
includes.h: Fix include for aix.
kanji.c: Added cap_to_sj as inverse of sj_to_cap.
loadparm.c:
local.h:
password.c: Added code for "networkstation user login" parameter.
- patch from Rob Nielsen <ran@adc.com>.
printing.c: Added further aix printing fixes.
reply.c: Changed access time fetch to a function.
trans2.c: Changed access time fetch to a function.
time.c: Changed access time fetch to a function.
server.c: Made NT redirector workaround final.
util.c: Added debug for write_socket failing.
Jeremy.
(This used to be commit a031404623)
1998-02-07 12:15:20 +00:00
Jeremy Allison
40dfc7e6de Added log message so we can tell when free_service is called.
Just in case of problems.
Jeremy.
(This used to be commit ee307df9ad)
1998-01-24 12:34:16 +00:00
Jeremy Allison
0c376c3ee7 Fix for memory leak in loadparm.c - donated by Branko Cibej <branko.cibej@hermes.si>
I checked this out and it looks ok - the bzero() in init_service() was
overwriting the pointers pservice->szService and pservice->copymap
that should have been freed in copy_service() the line later. This
fix frees pservice->szService and pservice->copymap inside free_service()
and sets them to zero so they won't be freed again.
Jeremy.
(This used to be commit 0bcb00e2ba)
1998-01-24 12:26:17 +00:00
Jeremy Allison
55f400bd84 This is *not* a big change (although it looks like one).
This is merely updating the Copyright statements from 1997 to 1998.
It's a once a year thing :-).
NO OTHER CHANGES WERE MADE.
Jeremy.
(This used to be commit b9c1697723)
1998-01-22 13:27:43 +00:00
Jeremy Allison
d57c055478 loadparm.c: Added fix for veto oplock files bug from Charles Hoch <hoch@hplcgh.hpl.hp.com>
server.c, util.c: Added fix for oplock break requests blocking due to server being
                  blocked in read call. Bug found by Charles Hoch <hoch@hplcgh.hpl.hp.com>.
Jeremy.
(This used to be commit 209f894fdb)
1997-12-20 10:52:00 +00:00
Jeremy Allison
efa661cb17 Missed terminating {-1,NULL} in an enum parameter list.
Jeremy.
(This used to be commit 5ea3633445)
1997-12-17 04:56:55 +00:00
Jeremy Allison
e9ef2a5a5e WHATSNEW.txt - updated for 1.9.18alpha13.
docs/smb.conf.5: Removed unused NTDOMAIN params. Added new params.
source/loadparm.c: Put #ifdef NTDOMAIN around unused params.
source/nmbd_become_lmb.c: Removed check for workgroup name in lmb name.
Jeremy.
(This used to be commit 5136c5ec11)
1997-12-16 12:21:39 +00:00
Jeremy Allison
16bf14adf1 Added Lanman announce patch from Jacco de Leeuw <leeuw@wins.uva.nl>.
Also added code to stop old Samba servers that announce the workgroup
name as master browser name when they are a local master browser.
Jeremy.
(This used to be commit 3605da0557)
1997-12-16 09:20:34 +00:00
Jeremy Allison
64f0348a3f This is it ! The mega-merge of the JRA_NMBD_REWRITE branch
back into the main tree.
For the cvs logs of all the files starting nmbd_*.c, look
in the JRA_NMBD_REWRITE branch. That branch has now been
discontinued.
Jeremy.
(This used to be commit d80b0cb645)
1997-12-13 14:16:07 +00:00
Andrew Tridgell
7a668a7641 applied a patch from Norm Jacobs to allow "printcap name = lpstat"
to use lpstat to obtain the printer list on systemV systems.

I've now made this the default on all SYSV systems.

Jeremy, you were a little worried about the security of this patch. I
believe it's OK as the user has no control over the options given to
popen() and the pipe is only open for reading.
(This used to be commit 6a83de0ae9)
1997-12-03 05:08:07 +00:00
Jeremy Allison
0aa493cc03 loadparm.c: Added lp_we_are_a_wins_server as an alias for lp_wins_support.
Used by the new nmbd and just makes more sense :-).
Jeremy.
(This used to be commit 7a2a45eae2)
1997-12-03 03:50:05 +00:00
Andrew Tridgell
11d7f4a2aa make the "printing" option a per share option rather than global. When
printing to lots of different sorts of remote printers this is useful
(This used to be commit 7a88bed4a5)
1997-12-03 03:37:02 +00:00
Andrew Tridgell
6c158adf25 oh no! my favourite hack is broken. You can't do:
[%U]
	path = %H

to get a new homes area. I wonder when it broke?

Anyway, I've fixed it. We can all rest easy now, knowing that you
really can produce an incomprehensible smb.conf and get it to work.
(This used to be commit 2245da4ad6)
1997-11-26 23:43:06 +00:00
Andrew Tridgell
51f20adc6b added true enumerated types in loadparm.c. Now we don't need all those
"interpret_security" and similar functions. This also means that
testparm produces string values for these enumerated types rather than
an integer. This was done to make the web interface much cleaner.

While I was doing this I found a couple of very nasty bugs in the
parm_table code. Someone had added a handle_character_set() function
that treated the char** pointer for a P_STRING as an integer! This
would have caused memory corruption for anyone using the "character
set" option. The loadparm code is delicate - please be careful about
using it's more esoteric features!

I've also removed the "coding system" global and made it a
P_STRING. The integer value was never used anywhere in Samba.
(This used to be commit bac6b0daa2)
1997-11-22 07:09:12 +00:00
John Terpstra
4e92c7d1a3 Added in mods for new smb.conf "remote browse sync" option as posted to
the samba-1.9.17 tree moments ago.
(This used to be commit 2ee25cd117)
1997-11-21 14:01:23 +00:00
Jeremy Allison
9f804556c4 loadparm.c : Added "veto oplock files" parameter.
make_printerdef.c: Fixed warning.
quotas.c: Fixed irix root errors.
server.c: Fixed oplock reference count bug.
smb.h: Added IS_VETO_OPLOCK_PATH().
Jeremy.
(This used to be commit c28487df63)
1997-11-17 19:16:38 +00:00
Luke Leighton
bd529d7a83 following a cvs error, i am rewriting this monster-commit. with bad grace.
Modified Files:
---------------

Makefile:

	adding extra files

ipc.c :

	send_trans_reply() - alignment issue.  this makes the alignment
	the same as that in NT.  this should be looked at by people who
	understand the SMB stuff better than i.

	api_fd_commands[] - added samr and wkssvc pipes.

loadparm.c :

	lp_domain_controller() changed to mean "samba is a domain controller".
	it's a "yes/no" parameter, now.  no, it isn't used _anywhere_.

namedbwork.c nameelect.c :

	if "domain controller = yes" then add SV_TYPE_DOMAIN_CTRL to the
	host _and_ workgroup announcements.  yes, you must do both: nt does.

namelogon.c :

	important NETLOGON bug in SAMLOGON request parsing, which may be
	the source of some people's problems with logging on to the Samba PDC.

password.c :

	get_smbpwnam() renamed to get_smbpwd_entry().

pipes.c :

	added samr and wkssvc pipes.

proto.h :

	usual.  can we actually _remove_ proto.h from the cvs tree, and
	have it as one of the Makefile dependencies, or something?

reply.c :

	get_smbpwnam() renamed to get_smbpwd_entry() - also changed response
	error code when logging in from a WORKSTATION$ account.  yes, paul
	is right: we need to know when to return the right error code, and why.

server.c :

	added call to reset_chain_pnum().

	#ifdef NTDOMAIN added call to init_lsa_policy_hnd() #endif.  jeremy,
	you'd be proud: i did a compile without NTDOMAIN, and caught a link
	error for this function.

smb.h :

	defines and structures for samr and wkssvc pipes.

smbpass.c :

	modified get_smbpwnam() to get_smbpwd_entry() and it now takes
	two arguments.  one for the name; if this is null, it looks up
	by smb_userid instead.

	oh, by the way, smb_userids are actually domain relative ids
	(RIDs).  concatenate a RID with the domain SID, and you have
	an internet globally unique way of identifying a user.

	we're using RIDs in the wrong way....

	added mod_smbpwnam() function.  this was based on code in smbpasswd.c

rpc_pipes/lsaparse.c :

	added enum trusted domain parsing.  this is incomplete: i need
	a packet trace to write it properly.

rpc_pipes/pipe_hnd.c :

	added reset_chain_pnum() function.

rpc_pipes/pipenetlog.c :

	get_smbpwnam() function renamed to get_smbpwd_entry().

	arcfour() issues.

	removed capability of get_md4pw() function to automatically add
	workstation accounts.  this should either be done using
	smbpasswd -add MACHINE$, or by using \PIPE\samr.

rpc_pipes/pipe_util.c :

	create_pol_hnd() - creates a unique LSA Policy Handle.  overkill
	function: uses a 64 bit sequence number; current unix time and
	the smbd pid.

rpc_pipes/smbparse.c :

	arcfour() issues.

	smb_io_unistr2() should advance by uni_str_len not uni_max_len.

	smb_io_smb_hdr_rb() - request bind uses uint16 for the context
	id, and uint8 for the num_syntaxes.  oops, i put these both as
	uint32s.


Added Files:
------------

rpc_pipes/lsa_hnd.c :

	on the samr pipe, allocate and associate an LSA Policy Handle
	with a SID.  you receive queries with the LSA Policy Handle,
	and have to turn this back into a SID in order to answer the
	query...

rpc_pipes/pipesamr.c rpc_pipes/samrparse.c

	\PIPE\samr processing.  samr i presume is the SAM Replication pipe.

rpc_pipes/pipewkssvc.c rpc_pipes/wksparse.c

	\PIPE\wkssvc processing.  the Workstation Service pipe?


holy cow.
(This used to be commit 1bd084b3e6)
1997-11-06 23:03:58 +00:00
Jeremy Allison
cdc6099647 Rolling back the files
loadparm.c : to equivalent to version 1.67
reply.c : to equivalent to version 1.69
server.c : to equivalent to version 1.122
util.c : to equivalent to version 1.98

to remove the incorrect changes.

proto.h: The usual.

rpc_pipes/smbparse.c : Backeting stuff that SHOULD NOT BE IN THE
                       none-NTDOMAIN build !

Jeremy.
(This used to be commit 6064c9d80f)
1997-11-03 19:24:45 +00:00
Luke Leighton
b26623bc3a Christian Lademann's contribution: new capabilities in smb.conf.
'<' and '|' characters indicate read file and execute command respectively,
and feed the output into the parameter (!!!).

'<$' and '|$' means run standard_sub_basic() on them.

this is going to be fun to document in smb.conf.5....

also, Christian created a new "online" service parameter.  services can
be taken "off-line"....
(This used to be commit 15f44d2891)
1997-11-02 20:35:20 +00:00
Luke Leighton
eebb68b92e loadparm.c :
added "domain hosts allow" and "domain hosts deny".  these are to be
	used to specify which workstations can log in to a samba PDC from.
	it is also used to check whether to add an initial machine password
	into the smbpasswd database or not

smbpass.c :

	added capability to add a machine password to the smbpasswd database.
	***** the default uid is zero *****

rpc_pipes/pipenetlog.c :

	use of "domain hosts allow/deny" parameters to allow login access.

proto.h :

	usual.
(This used to be commit 2e7d341030)
1997-11-02 19:27:26 +00:00
Andrew Tridgell
23c68038b9 pm_process() never closed the file (a memory and file descriptor leak)
(This used to be commit 0d9b0d0fff)
1997-10-31 04:27:55 +00:00
Andrew Tridgell
4fd96fddd2 clean up the hash entry code a bit. Got rid of lp_shmem_hash_size()
and made it private to the 2 shmem implementations. Added new
shmops->hash_size() function.

Added code to handle the IPC system limits by looping decreasing the
size of the resources (semaphores and shared memory) that we request
until we get under the system limits, which can be quite low on some
systems!

Added checks that the creator of the IPC objects is root. Otherwise we
would be open to a security hole where someone pre-creates the shared
memory segment and attaches.
(This used to be commit 6b6f624b63)
1997-10-29 01:59:54 +00:00
Jeremy Allison
8f0316bdbc Adding Windows 95 printer driver code donated by Jean-Francois.Micouleau@utc.fr.
New program, make_printerdef, plus two new parameters :

[global] "printer driver file"
[local] "printer driver location"

Jeremy.
(This used to be commit 9a5b42e6b3)
1997-10-28 19:32:59 +00:00
Luke Leighton
2e8cedba64 loadparm.c :
added "domain other sids" parameter

pipenetlog.c :

	using "domain other sids" parameter in SAM Logon response.
	using new name_to_rid() function for r_uid and r_gid.

pipentlsa.c :

	minor mods to do with new name_to_rid() function.

pipesrvsvc.c :

	in the "net share enum" response, allocate some more space for the buffer.
	there can be only 32 share entries in the response anyway.  this needs
	to be dealt with.

pipeutil.c :

	modified name_to_rid() function to use new parameters "domain admin users"
	and "domain guest users", but will otherwise do unix uid + 1000.

	moved make_dom_gids() here.

proto.h:

	the usual.

smb.h smbparse.c :

	renamed sid_no to sid_rev_num in DOM_SID, and gid to r_gid in DOM_GID.

util.c :

	moved make_dom_gids() from here.
	created char *unistrn2(uint16* uni_buffer, int max_len)
(This used to be commit ec60e48d79)
1997-10-22 11:31:37 +00:00
Luke Leighton
efe9b26a7b loadparm.c :
added "domain admin users" parameter
	added "domain guest users" parameter

	these two complement the "domain groups" parameter.  the "domain groups"
	parameter should be for your own groups, and well-known aliases.

util.c :

	added ability to do "domain groups = power_users admin_users backup_ops"
	which are well-known RID aliases, not well-known RID groups.

pipenetlog.c :

	combine the "domain admin users"; "domain guest users" and "domain groups"
	parameters to give an array of RID groups to include in the SAM Logon
	response.

ipc.c smb.h :

	moved REALLOC() into smb.h
	added RID #defines.

proto.h:

	usual.
(This used to be commit f2554f231d)
1997-10-21 18:25:14 +00:00
Jeremy Allison
79f4fb52c1 loadparm.c: Changed 'interfaces only' parameter to 'bind interfaces only'. Added
'dos filetimes' parameter for UTIME fix.
locking_shm.c: Fixed typo (sorry Andrew :-).
namepacket.c: Changed lp_interfaces_only() to lp_bind_interfaces_only().
proto.h: The usual.
reply.c: Made filetime calls use new file_utime call (wrapper for sys_utime).
server.c: Made filetime calls use new file_utime call (wrapper for sys_utime).
system.c: Added Andrew's sanity checks to times in sys_utime().
time.c: Moved set_filetime() to server.c. Made null_mtime()global.
trans2.c: Made filetime calls use new file_utime call (wrapper for sys_utime).
Jeremy (jallison@whistle.com)
(This used to be commit 41a1d81c11)
1997-10-20 18:52:04 +00:00
Luke Leighton
77a9385525 added "domain groups" parameter, allowing you to specify the groups that
the user belongs to.

it would be nice to know exactly what the domain groups _are_....
(This used to be commit c6e37d8db0)
1997-10-20 16:25:19 +00:00
Luke Leighton
423a7c4171 util.c password.c :
added automount_server() function which, if -DAUTOMOUNT is in use,
	returns the server name of the NIS auto.map entry.  otherwise,
	it returns local_server.

	added use of automount_server() for a new substitution %N for NIS
	home server.  this defaults, via automount_server(), to the same
	functionality as %L if -DAUTOMOUNT is not used.

	removed vuser->home_share.  moved code that grabbed the servername
	into the separate function automount_server().

loadparm.c :

	created "logon drive" (default of "")
	created "logon home"  (default of "\\%N\%U")
	changed default of "logon path" from NULL to "\\%N\%U\profile".

ipc.c pipenetlog.c :

	use lp_logon_drive(), lp_logon_home() and lp_logon_path() in their
	now easier-to-use form (don't have to check if *lp_logon_path() and
	manually substitute a default of \\%L\%U and do a standard_sub_basic()
	on the result, because the default automatically does this.
(This used to be commit c6c28a4c3c)
1997-10-20 12:10:58 +00:00
Andrew Tridgell
02674ea801 update the timestamp on config files in our linked list when we notice
they have changed, otherwise we keep reading them again and again
(This used to be commit 38c07fa932)
1997-10-19 23:22:03 +00:00
Jeremy Allison
07c507728b After talking with Andrew added "interfaces only" parameter that
turns off the filtering on the broadcast socket by default.
Jeremy (jallison@whistle.com)
(This used to be commit db9aad0748)
1997-10-18 00:22:04 +00:00
Andrew Tridgell
69eea4fcf8 fixed the problem that browsing breaks if you put quote marks around
the server string option.

I fixed it by adding: trim_string(ret, "\"", "\"") to lp_string()
which means that it removes leading and trailing quotes from _all_
strings in smb.conf. I think this is what we want as I can't actually
think of any case where quoted strings are needed.

I suspect that this fix will actually fix browsing at quite a few
sites. It's not uncommon to see people putting "" marks around the
workgroup name or other essential strings.

The real reason it was causing browsing to fail is that the browse.dat
file uses " to delimit fields, which means that it wasn't being parsed
correctly. It would be nice to use a proper database format in
browse.dat sometime. In fact, we really need a generic database type
subsystem in Samba to replace the mish-mash we currrently use
(browse.dat, wins.dat, smbpasswd etc)
(This used to be commit ac50a88e11)
1997-10-16 03:53:07 +00:00
Luke Leighton
8871297885 loadparm.c proto.h:
added lp_domainsid()

lsaparse.c smb.h:

	debugging structures and parsing functions

pipes.c:

	finally got to the functions that will go into the RPC switch statement.
(This used to be commit d15aed8a9c)
1997-10-08 17:12:07 +00:00
Jeremy Allison
2e92be3aaf client.c: Changed shadowed variable.
locking.c: Removed USE_OPLOCKS - now the default.
params.c: Removed unused variable.
proto.h: Updated.
reply.c: Removed USE_OPLOCKS - now the default.
server.c: Removed USE_OPLOCKS - now the default.
smb.h: Removed USE_OPLOCKS - now the default.
smbparse.c: Changed shadowed variable.
status.c: Removed USE_OPLOCKS - now the default.
util.c: Removed USE_OPLOCKS - now the default.
Jeremy (jallison@whistle.com)
(This used to be commit b93509846d)
1997-10-06 17:52:25 +00:00
Christopher R. Hertel
e722d70776 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 -)-----
(This used to be commit 09dc951f2a)
1997-10-04 01:07:47 +00:00
Andrew Tridgell
85097a7c17 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?
(This used to be commit 44bc9f239a)
1997-10-02 03:14:32 +00:00
Jeremy Allison
cef59090bb Adding Andrews buffer overflow fixes into the main branch.
Jeremy (jallison@whistle.com)
(This used to be commit e7eb1f044d)
1997-09-26 18:55:29 +00:00
Jeremy Allison
a2d2206cc9 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)
(This used to be commit 97ed4fea67)
1997-09-19 17:12:08 +00:00
Jeremy Allison
1590983eb0 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)
(This used to be commit 29c6c037dc)
1997-09-17 01:29:53 +00:00
Andrew Tridgell
33a003de40 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.
(This used to be commit db917c62c1)
1997-09-14 16:37:18 +00:00
Jeremy Allison
30416c0b8a 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)
(This used to be commit 9196255022)
1997-09-11 20:17:32 +00:00
Andrew Tridgell
c6d4477628 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
(This used to be commit 6d16501606)
1997-09-11 02:19:04 +00:00
Luke Leighton
72af2c1831 added debug reporting to file listing / mod_time() checking routine.
lp_file_list_changed().
(This used to be commit 727fcfae1b)
1997-09-05 17:16:21 +00:00
Samba Release Account
9b41ada7c8 charset.c: Fixed bug with 'valid chars' param.
loadparm.c:	Fixed bug with 'valid chars' param.
nameelect.c:Unregister the 1b name from the WINS server when unbecoming master.
nameservresp.c: Fix nasty browse bug where we were sending the query
                to the wrong ip address.
Jeremy (jallison@whistle.com)
(This used to be commit 927d1875f0)
1997-08-12 23:02:45 +00:00
Samba Release Account
b5114b41f5 Makefile: Added IRIX 6 target.
loadparm.c: Fixed stupid static warnings with set_default_server_announce_type.
password.c:	Fixed char -> uchar cast warnings.
nameservreply.c: Fixed group fade out code.
Jeremy (jallison@whistle.com)
(This used to be commit a2dd5c5a55)
1997-08-05 01:31:55 +00:00
Samba Release Account
363b9a2739 loadparm.c: Added new netbios aliases parameter (code from Cisco)
nameannounce.c: Code to announce aliases as well as our own names.
namedbsubnet.c: Code to add the aliases to the server list.
nameserv.c:		Code to defend our aliases on the namelist.
namework.c:		Code to check it's one of our aliases.
nmbd.c:			Code to initialise the aliases.
proto.h:		Fixup protos.
util.c:			Code to check it's one of our aliases.
All above code based on code for 1.9.16p11 donated by Cisco
from Ben Woodard <bwoodard@luthien.cisco.com>
Jeremy (jallison@whistle.com)
(This used to be commit a2ce1c0cb1)
1997-07-31 18:47:26 +00:00
Samba Release Account
75bbf35a86 client.c: Minor change to cast parameters for DEC unix.
clientutil.c:	Minor change to cast parameters for DEC unix.
ipc.c:		Fixes to parameterise the stuff John wants.
loadparm.c:	Fixes to parameterise the stuff John wants.
nameannounce.c: Fixes to parameterise the stuff John wants.
namedbwork.c: Fixes to parameterise the stuff John wants.
nameserv.h:	Fixes to parameterise the stuff John wants.
proto.h: Fixes to parameterise the stuff John wants.
smb.h: Fixes to parameterise the stuff John wants.
util.c: tidy.
Jeremy (jallison@whistle.com)
(This used to be commit 9fbca2594b)
1997-07-30 19:17:51 +00:00
Samba Release Account
834518eddd loadparm.c: Changed default create mask to 755 to support MAP_ARCHIVE.
server.c:	Added check for MAP_ARCHIVE before we set archive bit.
Jeremy (jallison@whistle.com)
(This used to be commit d21a166277)
1997-07-24 22:42:16 +00:00
Samba Release Account
15ae50ca52 Makefile: Added UNIXWARE 2.x with shadow passwords from fja@extratech.com
client.c:	Made prompt appear at debug level 0. Fixed strcasecmp redefinition.
            Caused client to use set_blocking rather than making fcntl calls itself.
dir.c:		Removed redundent snum parameters.
includes.h:	Added SCO fixes.
loadparm.c:	Made default 'files to hide' a null string.
nmbd.c:		Removed O_NONBLOCK from pid file open for platforms that dont have it.
proto.h:	Changed snum to cnum where needed. Changed is_xx_path to is_in_path
            (now called via MACRO).
quotas.c:	Swapped setuid/seteuid calls when restoring uid.
reply.c:	Removed redundent snum parameters.
server.c:	Changed snum to cnum where needed. Setup new veto_list, hide_list
            namelists. Added standard_sub changes from
            Stefaan A Eeckels <Stefaan.Eeckels@ecc.lu> and
            Paul Rippin <pr3245@nopc.eurostat.cec.be>
shmem.c:	Changed cast for sizeof to be int before negating.
smb.h:		Added new veto_list, hide_list entries to connections.
            Added IS_PRINT, IS_HIDDEN_PATH, IS_VETO_PATH macros.
trans2.c:	Removed redundent snum parameters.
util.c:		Added standard_sub_basic changes from
            Stefaan A Eeckels <Stefaan.Eeckels@ecc.lu> and
            Paul Rippin <pr3245@nopc.eurostat.cec.be>
            Fixed up veto/hidden path processing so the paths are
            pres-parsed and checked for wildcards (for speed).
Jeremy (jallison@whistle.com)
(This used to be commit 9afa36f787)
1997-07-24 17:25:11 +00:00
Samba Release Account
612111c7a1 charset.c: Split charset_initialise() into 2 - a charset_initialise() and
a codepage_initialise(). Fixes problem with initialising dos map
            twice.
charset.h:  Changes to support charset changes.
client.c:   Changes to support charset changes.
loadparm.c:	follow symlinks parameter from David Clerc <David.Clerc@cui.unige.ch>
nmbd.c:		Changes to support charset changes.
nmblookup.c:Changes to support charset changes.
proto.h:	Changes to support charset changes.
reply.c:	Don't call security=server with no user/no password guest. Fix from
            Stefaan A Eeckels <Stefaan.Eeckels@ecc.lu>
server.c:   follow symlinks code from David Clerc <David.Clerc@cui.unige.ch>
smbpasswd.c:Changes to support charset changes.
status.c:	Changes to support charset changes.
testparm.c: Changes to support charset changes.
testprns.c: Changes to support charset changes.
uid.c:		Fixed log message with no \n.
Jeremy (jallison@whistle.com)
(This used to be commit 2a28a6e5e4)
1997-07-18 20:21:32 +00:00
Samba Release Account
25eae02948 Makefile: Added AIX targets from Ole Holm Nielsen <Ole.H.Nielsen@uni-c.dk>
chgpasswd.c:	Added Samba/GPL notice (for obvious reasons).
clitar.c:		Updated Copyright date to include 1997 (for obvious reasons).
getsmbpass.c:	Updated Copyright date to include 1997 (for obvious reasons).
includes.h:		Added stropts for solaris.
loadparm.c:		Changed comment for hide files option.
nameconf.c:		Updated Copyright date to include 1997 (for obvious reasons).
nmbd.c:			Updated Copyright date to include 1997 (for obvious reasons).
pcap.c:			Updated Copyright date to include 1997 (for obvious reasons).
proto.h:		Re-added accidentaly deleted smb_shm_ calls.
quotas.c:		Added AIX quota patch from Ole Holm Nielsen <ohnielse@fysik.dtu.dk>
server.c:		Optimization on calling is_hidden_path. Updated Copyrights.
smb.h:			Changed DEFAULT_FILES_TO_HIDE from  "*/.*" to ".*".
smbpass.c:		Updated Copyright date to include 1997 (for obvious reasons).
ufc.c:			Updated Copyright date to include 1997 (for obvious reasons).
util.c:			Added last component code to is_in_path().
Jeremy (jallison@whistle.com)
(This used to be commit 9385ae1005)
1997-07-08 16:54:44 +00:00
Samba Release Account
1fe89d0b71 added, tested and debugged new "hide files" option.
lkcl
(This used to be commit 60af320a43)
1997-07-06 13:48:10 +00:00
Samba Release Account
b4863b07f4 replaced the "wins proxy" to treat NetBIOS names as DNS names with new
"dns proxy" option.  the "wins proxy" option should be used for broadcast
only hosts, and isn't properly implemented anyway.

the new "dns proxy" option can be disabled if the (blocking) dns resolution
takes up a significant amount of time.  this _will_ occur if gethostbyname
does external DNS lookups, instead of just (immediately) returning entries
in /etc/hosts.

lkcl
(This used to be commit 350dfc57dd)
1997-07-06 12:06:23 +00:00
Samba Release Account
1599e41ec4 Rolled back Lukes changes. Not quite ready for prime time.
Jeremy (jallison@whistle.com)
(This used to be commit ed04ec7ab8)
1997-07-01 20:50:57 +00:00
Samba Release Account
ce9baa3bac made "hide files" and "veto files" into per-service parameter sections,
instead of just [global].  this makes it easier to decide whether to
remove the "hide dot files" per-service parameter, and supercede it with
a default "hide files" value of ".*".

lkcl
(This used to be commit f3ee4620ea)
1997-07-01 19:42:42 +00:00
Samba Release Account
738d29667f added "hide files" option.
lkcl
(This used to be commit 6e594ce0e5)
1997-07-01 19:02:43 +00:00
Samba Release Account
fb1429c197 client.c: New print queue query code from Jeff C. Foster " <jfoste@wgc.woodward.com>
ipc.c:			Added code for returning restricted lists of servers.
loadparm.c:		Changed default for force create mode to 000.
				Changed default maxmux to 50 to comply with NT.
locking.c:		Fixed silly crash bug with slow share mode code.
nameannounce.c:	Added code for returning restricted lists of servers.
namedbserver.c:	Added code for returning restricted lists of servers.
nameelect.c:	Added code for returning restricted lists of servers.
namework.c:		Added code for returning restricted lists of servers.
nmbsync.c:		Added code for returning restricted lists of servers.
server.c:		Added quota fix Albrecht Gebhardt <albrecht.gebhardt@uni-klu.ac.at>
smb.h:			Added define for COPYBUF_SIZE.
system.c:		Rename across filesystems Patch from Warren Birnbaum
				<warrenb@hpcvscdp.cv.hp.com>
util.c:			Minor fix for warning.
(This used to be commit 1c6e433caa)
1997-07-01 01:19:13 +00:00
Samba Release Account
434d26acfe loadparm.c: Added "force create mode" and "force directory mode" params.
proto.h:	Added lp_force_create_mode()and lp_force_dir_mode().
server.c:	Fixed application of mode bits to be regular across files
		and directories.
smb.h:		Removed unused CREATE_MODE macro.
Jeremy (jallison@whistle.com)
(This used to be commit 2c92821250)
1997-06-19 00:18:23 +00:00
Samba Release Account
2a33e58d18 charset.c: Dropped debug message to level 6.
loadparm.c:	Added "time server" parameter.
nameserv.h:	Added "time server" parameter.
proto.h:	Added lp_time_server().
server.c:	Removed incorrect | 0700 - this was a whistle specific change.
Jeremy (jallison@whistle.com).
(This used to be commit 54dcca1240)
1997-06-16 20:49:15 +00:00
Samba Release Account
c6e63aa896 Makefile: Added quoata changes for Linux from Thorvald Natvig
Makefile.RPM:	Added quoata changes for Linux from Thorvald Natvig
charset.c:	Large changes to add multiple client code pages.
charset.h:	Changed charset_initialise() proto.
client.c:	Fixed message sending bug. Changed charset_initialise().
ipc.c:		Fixed #ifdef compile problems.
loadparm.c:	Added "client code page" option.
nmbd.c:		Changed charset_initialise(). Fixed lmhosts read.
nmblookup.c:	Changed charset_initialise().
proto.h:	Added lp_client_code_page(void).
quotas.c:	Added quoata changes for Linux from Thorvald Natvig
reply.c:	Changed debug level. Made SMBecho ignore tid.
server.c:	Changed charset_initialise().
smb.h:		Added DEFAULT_CLIENT_CODE_PAGE as 850.
smbpasswd.c:	Changed charset_initialise().
status.c:	Changed charset_initialise().
testparm.c:	Changed charset_initialise().
testprns.c:	Changed charset_initialise().
Jeremy Allison (jallison@whistle.com)
(This used to be commit 957025bace)
1997-06-11 01:03:06 +00:00
Samba Release Account
548196362b loadparm.c: Made explicit max packet now ignored.
namedbwork.c:	Don't announce potential browser if local master = False.
nameelect.c:	Raise debug level of comment to 2.
proto.h:	Added reset_globals_after_fork().
server.c:	Call reset_globals_after_fork() after forking child.
util.c:		Added reset_globals_after_fork() - should stop problems
                with % substitutions in children.
(This used to be commit 77be0f710c)
1997-06-06 16:14:17 +00:00
Samba Release Account
ccf4314fe7 loadparm.c: Ensure printer services cannot be read only and don't use share mode locking.
locking.c:	Changed aborts to returns so not so drastic on PANIC errors.
proto.h:	Removed definition of open_file as this is now never externally called.
reply.c:	Changed reply_mknew, reply_ctemp, reply_printopen to go through open_file_shared.
server.c:	Modified open_file_shared to be more robust and be useful for printer & temp files.
		Removed truncate option from open_file (now all truncates are done in open_file_shared).
util.c:		Added EAGAIN to errors checked in open_socket_out().
version.h:	Updated to 1.9.17alpha2.
jallison@whistle.com
(This used to be commit d8471909b7)
1997-05-27 20:28:45 +00:00
Samba Release Account
aa864415c5 dir.c: Fixed double slash issue.
includes.h: Changed to ifdef FAST_SHARE_MODES.
ipc.c:  Changed lp_workgroup() to myworkgroup.
loadparm.c:  Added new shared mem parameters. Added Luke's fix.
locking.c: Rewrite to do share modes better (both fast and slow modes).
nameannounce.c:  Changed lp_workgroup() to myworkgroup. Added Luke's fix.
nameconf.c:  Changed lp_workgroup() to myworkgroup.
namedbname.c:  Improved debug.
namedbserver.c:  Changed lp_workgroup() to myworkgroup.
namedbsubnet.c:  Added Luke's fix - rewritten somewhat.
namedbwork.c:  Changed lp_workgroup() to myworkgroup.
nameelect.c:  Added Luke's fix - rewritten somewhat.
nameresp.c:  Stoped shadowing global.
nameserv.c:  Added Luke's fix - Improved debug.
nameservreply.c:  Improved debug.
namework.c:  Changed lp_workgroup() to myworkgroup.
nmbd.c:  Added Luke's fix - Changed lp_workgroup() to myworkgroup.
pipes.c:   Changed lp_workgroup() to myworkgroup.
proto.h:   Added Luke's fix, added smb_shm_ proto's.
reply.c:  Changed lp_workgroup() to myworkgroup.
server.c:  Rewrite to do share modes better (both fast and slow modes).
shmem.c:  Rewrite to do share modes better (both fast and slow modes).
smb.h:  Rewrite to do share modes better (both fast and slow modes).
status.c:  Rewrite to do share modes better (both fast and slow modes).
trans2.c:  Fixed double slash issue.
util.c:  Tidied up, created myworkgroup.
Jeremy Allison (jallison@whistle.com).
(This used to be commit 2a1711eaaf)
1997-05-20 00:32:51 +00:00
Samba Release Account
0f1f0ceb95 'The mother of all checkins' :-). Jeremy Allison (jallison@whistle.com)
Wed May  7 1997: Update for 1.9.17alpha1 release - 'browsefix release'
designed to make browsing across subnets work.

byteorder.h:	Updated copyright to 1997.
charcnv.c:      Updated copyright to 1997.
charset.c 	Updated copyright to 1997.
charset.h	Updated copyright to 1997.
client.c	Updated copyright to 1997.
clientutil.c	Updated copyright to 1997.
dir.c		Updated copyright to 1997.
fault.c		Updated copyright to 1997.
includes.h	Updated copyright to 1997.
interface.c	Updated copyright to 1997.
ipc.c		Updated copyright to 1997.
kanji.c		Updated copyright to 1997.
kanji.h		Updated copyright to 1997.
loadparm.c	Updated copyright to 1997.
locking.c	Updated copyright to 1997.
mangle.c	Updated copyright to 1997.
message.c	Updated copyright to 1997.
nameannounce.c

	Made use of WINS subnet explicit.
Added reset_announce_timer() so announcement
can be made immediately when we become a master.
Expanded code to do sync with dmb.

namebrowse.c

	Removed redundent checks for AM_MASTER in
sync code. Made use of WINS subnet explicit.

namedbname.c	Made use of WINS subnet explicit.
namedbresp.c	Made use of WINS subnet explicit.
namedbserver.c	Made use of WINS subnet explicit.

namedbsubnet.c

	Explicitly add workgroup to WINS subnet
when we become a dmb. Made use of WINS subnet explicit.

namedbwork.c

	Made use of WINS subnet explicit. Removed
redundent check_work_servertype() function.

nameelect.c

	Explicitly add workgroup to WINS subnet
when we become a master browser. Made use of WINS subnet explicit.

namelogon.c	Updated copyright to 1997.
namepacket.c	Updated copyright to 1997.
namequery.c	Updated copyright to 1997.

nameresp.c

	Made use of WINS subnet explicit. Made nmbd fail if
configured as master browser and one exists already.

nameserv.c

	Made use of WINS subnet explicit. Remove redundent
logon server and domain master code.

nameserv.h	Add emumerate subnet macros.
nameservreply.c	Made use of WINS subnet explicit.
nameservresp.c	Updated copyright to 1997.

namework.c

	Made use of WINS subnet explicit. Updated code to
add sync browser entries to add subnet parameter.

nmbd.c

	Added sanity check for misconfigured nmbd.

nmblib.c	Updated copyright to 1997.
nmblookup.c	Updated copyright to 1997.
nmbsync.c

	Removed redundent AM_ANY_MASTER check.

params.c	Updated copyright to 1997.
password.c	Updated copyright to 1997.
pipes.c		Updated copyright to 1997.
predict.c	Updated copyright to 1997.
printing.c	Updated copyright to 1997.

proto.h

	Changed protos for new nmbd code.

quotas.c	Updated copyright to 1997.
replace.c	Updated copyright to 1997.
reply.c		Updated copyright to 1997.
server.c	Updated copyright to 1997.
shmem.c		Updated copyright to 1997.
smb.h		Updated copyright to 1997.
smbencrypt.c	Updated copyright to 1997.
smbpasswd.c	Updated copyright to 1997.
smbrun.c	Updated copyright to 1997.
status.c	Updated copyright to 1997.
system.c	Updated copyright to 1997.
testparm.c	Updated copyright to 1997.
testprns.c	Updated copyright to 1997.
time.c		Updated copyright to 1997.
trans2.c	Updated copyright to 1997.
trans2.h	Updated copyright to 1997.
uid.c		Updated copyright to 1997.
username.c	Updated copyright to 1997.
util.c		Updated copyright to 1997.
version.h

	Changed to 1.9.17alpha1.
(This used to be commit cf23a155a1)
1997-05-08 01:14:17 +00:00
Samba Release Account
121c81e3d6 added automount home directory support. contributed by simeon@bangor.co.uk
and a mini bug-fix by rob.nacarrato@sheridanc.on.ca

reads in an entry from the auto.home file for the user when they log in,
and mounts their home directory as the default path for the [homes] service.

i might add this as to the %substitution system, so that you can
specify subdirectories for the user profiles, mainly.

lkcl
(This used to be commit 0bb6acc358)
1997-05-07 17:56:46 +00:00
Samba Release Account
20b5dea237 Large changes from jra@cygnus.com. Mainly browser updates.
access.c: Fixed crash if yp domain unavailable.
includes.h: Moved ifdefs for minor platform.
interface.c: Changed name of ipgrp to wins_ip to make it clearer.
loadparm.c: Changed default of wins support to 'no'.
nameannounce.c: Many changes to fix cross subnet browsing.
namebrowse.c: Many changes to fix cross subnet browsing.
namedbname.c: Many changes to fix cross subnet browsing.
namedbresp.c: Many changes to fix cross subnet browsing.
namedbsubnet.c: Many changes to fix cross subnet browsing.
namedbwork.c: Many changes to fix cross subnet browsing.
nameelect.c: Many changes to fix cross subnet browsing.
namelogon.c: Many changes to fix cross subnet browsing.
namepacket.c: Many changes to fix cross subnet browsing.
nameresp.c: Many changes to fix cross subnet browsing.
nameserv.c: Many changes to fix cross subnet browsing.
nameserv.h: Many changes to fix cross subnet browsing.
nameservreply.c: Many changes to fix cross subnet browsing.
nameservresp.c: Many changes to fix cross subnet browsing.
namework.c: Many changes to fix cross subnet browsing.
nmbd.c: Change to search wins subnet.
nmbsync.c: Change to check if we are any master before proceeding.
proto.h: Added find_subnet_all() and check_work_servertype().
util.c: Moved 'done' settings on name resolution.
(This used to be commit a82476eee2)
1997-04-09 01:19:25 +00:00
Samba Release Account
df42b0a7bc Makefile: Added cleandir target.
chgpasswd.c: Added patch from Roland Haag <haag@think.de> to allow
             password changes to be done more than once.
loadparm.c: Added entries for the "directory mode/directory mask parameters".
            Changed default file mode to 644.
proto.h: Added sys_gethostbyname.
server.c: Added directory mode changes.
system.c: Added sys_gethostbyname.
trans2.c: Added NT_FILE_ATTRIBUTE_NORMAL patch from Roger Orr
          <rorr@csfp.csfb.com>
trans2.h: Defined NT_FILE_ATTRIBUTE_NORMAL for above patch.
util.c: Changes calls to gethostbyname to sys_gethostbyname.
jra@cygnus.com
(This used to be commit d8d8a7ee00)
1997-02-23 05:18:09 +00:00
Samba Release Account
98bf10bc5d util.c: StrCaseCmp and StrnCaseCmp terminated incorrectly, giving false
answers when a string was partially identical.  this issue is still
outstanding, and needs to be investigated further.

loadparm.c: added lp_logon_path() parameter.
ipc.c: in NetUserGetInfo, lp_logon_path() can be returned instead of always
specifying \\SAMBA_SERVER\HOMES (which may not necessarily exist).
it is now possible to specify lp_logon_path() as \\ARBITRARY_SERVER\%U,
just like NT server can.  the default is \\SAMBA_SERVER\HOMES, just like
it used to be.

lkcl
(This used to be commit d5b6ad7cb8)
1997-02-02 18:12:36 +00:00
Samba Release Account
5b6f1e347e Added in veto files parameter created by Whistle.
jra@cygnus.com
(This used to be commit 09aa77766c)
1996-12-10 17:51:42 +00:00
Andrew Tridgell
08d00eb68e - added support for TMPDIR env variable
- fixed fault.c for linux 2.1
- put back in the FIND_SELF failing code
- cleaned up casts in encryption
(This used to be commit 3af04f1580)
1996-10-24 00:09:08 +00:00
Andrew Tridgell
c71c1ff55f - set default printer driver string to "NULL"
- fixed debug levels for name status parsing
(This used to be commit f2c5f1eab1)
1996-10-11 05:49:42 +00:00
Andrew Tridgell
e5893bdfbe I have fixed quite a few important bugs in this commit.
Luke, can you take special note of the bug fixes to nmbd so you can
propogate them to your new code.

- rewrote the code that used to use fromhost(). We now call
gethostbyaddr() only if necessary and a maximum of once per
connection. Calling gethostbyaddr() causes problems on some systems so
avoiding it if possible is a good thing :-)

- added the "fake oplocks" option. See the docs in smb.conf(5) and
Speed.txt

- fixed a serious bug in nmbd where it would try a DNS lookup on
FIND_SELF queries. This caused a lot of unnecessary (and incorrect)
DNS lookups to happen. FIND_SELF queries should only go to the
internal name tables.

- don't set FIND_SELF for name queries if we are a wins proxy, as we
are supposed to be answering queries for other hosts.

- fixed a bug in nmbd which had "if (search | FIND_LOCAL)" instead of
"if (search & FIND_LOCAL)". Luke, this was in nameservreply.c

- the above 3 bugs together meant that DNS queries were being cached,
but the cache wasn't being used, so every query was going to DNS, no
wonder nmbd has been chewing so much CPU time! Another side effect was
that queries on names in lmhosts weren't being answered for bcast
queries with "wins proxy" set.

- ignore the maxxmit for seconday session setups (see CIFS spec)

- close user opened files in a uLogoffX for user level security (see
CIFS spec)

- added uid into the files struct to support the above change
(This used to be commit ea472b7217)
1996-10-05 10:41:13 +00:00
Andrew Tridgell
afd08462ad backout all the changes to nmbd.
The 1.9.16 tree is now back to 1.9.16p2 as far as nmbd is concerned
apart from a small change that fixes the announce type in two places.
(This used to be commit 45e66a69d3)
1996-10-02 15:41:30 +00:00
Andrew Tridgell
5a2f52b79e - a huge pile of changes from Luke which implement the browse.conf
stuff and also fix a pile of nmbd bugs. Unfortunately I found it very
hard to disentangle the new features from the bug fixes so I am
putting in the new code. I hope this is the last big pile of changes
to the 1.9.16 series!
(This used to be commit 20b6203dac)
1996-10-02 14:09:22 +00:00
Samba Release Account
9ad5a3fe36 removed all of lukes recent changes. I need to do a p2 release but
can't test the multi group changes.

I also found that some of lukes changes wiped out some recent bug
fixes. Is your CVS tree ok luke?
(This used to be commit 8b7fe224bc)
1996-08-24 01:41:46 +00:00
Samba Release Account
5945be9718 - fixed bugs in nmb response packet checking.
- added multiple workgroup code - samba can register under different
  (unique) NetBIOS aliases, one per workgroup it joins.

lkcl
(This used to be commit f24e341e7e)
1996-08-23 10:17:30 +00:00
Andrew Tridgell
0c33046a0a - added "netbios name" option in smb.conf to make controlling the name
that samba uses possible

- added "socket address" option to allow virtual SMB servers (on
systems with IP aliasing line Linux)

- disabled FAST_SHARE_MODES by default in Linux as older Linux boxes
can't do shared writeable mappings. We really need autoconf ...

- added new option types in loadparm so a string type can be specified
ot be uppercase only, this is used for the workgroup and netbios name
options

- auto-create the lock directory if it doesn't exist in shared mem
startup

- get rid of announce_backup()

- change a few comments in nmbd code

- rewrote the chaining code completely. Hopefully it will handle any
depth chains now.

- added LPRng support
(This used to be commit e9eac6cd49)
1996-08-19 11:17:29 +00:00
Andrew Tridgell
28177ca73b - added support for Amiga-unix (based on BSD I think)
- changed the order of PROGS and SPROGS in Makefile (SPROGS first)

- another 64 bit cleanup (for INADDR_NONE)

- added paranoia code in DirCacheAdd() to detect looping

- fixed important DirCache flush bug

- rewrote the NetServerEnum code after I found it could return servers
from multiple workgroups at once, and this could cause browsing
havoc. Now a null workgroup query is equivalent to a query for the
servers primary workgroup

- got rid of my_workgroup()

- got rid of "workgroup = *" comment in Makefile. We no longer support
a workgroup of *, users must set the workgroup explicitly

- the wins.dat file was being stored in a different format to what it
was being loaded in - this could cause havoc. fixed.

- uppercase our netbios name and the workgroup name at startup

- if accept fails in main loop when running as a daemon then continue,
don't just exit!

- don't use ./ on smbclient in smbtar

- better code to detect if a process exists
(This used to be commit ec3d539630)
1996-08-17 11:37:44 +00:00
Andrew Tridgell
f63d4c830a - added the "remote announce" option
- made the lp_string() code able to handle any length string
- got rid of the obsolete lmhosts code, instead users should use
"interfaces" and "remote announce". lmhosts now is just used as a IP
to netbios name map
- cleanup the inet_address() code
(This used to be commit be2b679403)
1996-08-16 13:03:26 +00:00
Andrew Tridgell
396311075c - sequent-ptx support from bressler@iftccu.ca.boeing.com (Rick
Bressler)
- machten support from Trevor Strohman (trev@figment.tenon.com)

- added qinfo command to client as part of drag-and-drop printer
support for win95 from David Chappell <chappell@mouse.cc.trincoll.edu>
He also added the "printer driver" option

- use sigblock() on more systems and use sigsetmask(0) instead of
sigunblock() as its more portable. This beats a problem with zombies
on heavilily loaded systems.

- added internals.doc written by David Chappell into the source tree

- get rid of PRINT_COMMAND options from local.h as they are no longer
relevent

- new kanji code from Fujita

- don't set the recursion_available flag on queries in nmbd

- fix a potential bug with pointer subtraction in printing.c

- got rid of error_count code as the real fix (the EOF problem) is now
in
(This used to be commit aa6f8b04d1)
1996-08-13 08:57:55 +00:00
Andrew Tridgell
6b680bb89c minor cleanups
(This used to be commit 7c8fd43b4e)
1996-07-24 06:14:51 +00:00
Andrew Tridgell
234b8c6022 removed the remote interfaces stuff.
(This used to be commit 51e5a1a546)
1996-07-22 14:32:38 +00:00
Samba Release Account
ed2639ebe2 luke's first attempt at using cvs
accidentally updated the Makefile

updated the name database structure (again!). this time, there is one
name database per local interface. there is also a pseudo-interface on
ip 255.255.255.255. its purpose is to store WINS name entries. all the
local interface name databases store SELF names only. the WINS name
database stores non-special browser names.

added wins.dat file: records WINS entries in ascii format. this is reloaded
when nmbd restarts.

added repeating code for response packets. timer is in seconds only at the
moment.

updated the response queue code to deal with samba registering with a
WINS server a bit better (added more cases when a response isn't received).
tidied up the response packet processing code and expire_response_queue()
code. added cross references between response received and await-response
expired code.

added over-zealous code that checks all machines that register with samba
as a WINS server (every 10 minutes i think): to see whether they are still
alive or not (see rfc1001.txt)

bug reported by terry@ren.pc.athabascau.ca: DNSFAILed names _stay_ as
DNSFAIL, even though the machine may come back up and REGISTER.

removed update_from_reg() function. it's not necessary, and it does too much.

added code that announces on each local interface samba's ttl as zero and
servertype as zero when nmbd is kill -TERMed

first attempt at putting the first functionality of samba browsing back in
(remote subnets should have samba appear in a workgroup specified through
the lmhosts file)

lots of other miscellaneous tidying up / chopping about.
(This used to be commit 7e8c60cfe5)
1996-06-29 18:49:20 +00:00
Andrew Tridgell
7e3b4a1c0d got rid of a lot of redundent header files as we now globally generate
prototypes automatically using "make proto". This is much less prone
to error than the old method of manually adding prototypes
(This used to be commit b551dc98f7)
1996-06-10 04:38:24 +00:00
Andrew Tridgell
d160d93d8f - added predict.c, moving the routines from util.c
- added iface_count() and iface_n_ip() routines so its easy to loop
over the local interface list

- made readsize a normal loadparm global

- check for null w in add_domain_entry()

- set the deathtime to time()-1 for doamin entries with servertype==0
This allows servers that are shutting down to be removed

- add the 0x1c name at startup if we are a WINS server. Previously we
added it only if we were a master

- loop over interfaces in add_my_domains(), so people don't have to
have a lmhosts file to get lp_workgroup() on all interfaces

- set add to True for find_workgroupstruct() in nmbsync, and check for
null return

- remove some ugly "errno = EBADF" bits. they just confused things.
(This used to be commit 88b191b488)
1996-06-07 03:34:22 +00:00
Andrew Tridgell
b9ae225b28 - added interface.c and removed all the references to myip, bcast_ip
and Netmask, instead replacing them with calls to routines in
interface.c

- got rid of old MAXINT define

- added code to ensure we only return one entry for each name in the ipc
enum routines

- added new_only option to add_netbios_entry() to prevent overwriting
of important names

- minor time handling fixup
(This used to be commit 7ed71b73ae)
1996-06-06 11:43:09 +00:00
Andrew Tridgell
a2641cfe00 Did more integration of Lukes code ready for the first release.
I've now got WINS registration working, and refresh working. Its
looking pretty good so far, but needs lots of testing.
(This used to be commit 045014aa57)
1996-06-04 15:14:47 +00:00
Andrew Tridgell
a2c1623827 a huge pile of changes :-)
The biggest thing is the integration of Lukes new nmbd. Its still
largely untested, so we will really need some feedback

I've also added auto prototype generation and cleaned up a lot of
minor things as a result
(This used to be commit 0d8dcfa13c)
1996-06-04 06:42:03 +00:00
Andrew Tridgell
81e398963d - moved the uid handling to uid.c
- added setfsuid() support (for Linux)
- started adding some of Lukes changes, just the loadparm and ipc ones
so far
(This used to be commit 72543810ce)
1996-06-01 15:25:30 +00:00
Andrew Tridgell
58734631b4 Lots of changes!
- add faq info on NT printer handling
- add "delete readonly" option to help rcs users
- add stuff to man pages on new printer options
- add "proxy name resolution" option
- add "command string" -c option to smbclient (thanks Ken)
- split time functions into time.c
- rearrange the quotas stuff a bit and fix some bugs
- complete rehash of the time handling code thanks to Paul Eggert
- fix nmblookup output a bit
- add plp print queue parsing from Bertrand Wallrich
(This used to be commit 635b56f19c)
1996-05-31 15:13:29 +00:00
Samba Release Account
0e8fd33987 Initial version imported to CVS
(This used to be commit 291551d807)
1996-05-04 07:50:46 +00:00