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

483 Commits

Author SHA1 Message Date
Tim Potter
79b34d1b11 Removed TimeInit() call from every client program (except for one place
in smbd/process.c where the timezone is reinitialised.  Was replaced with
check for a static is_initialised boolean.
(This used to be commit 8fc772c9e5)
2001-11-23 00:52:29 +00:00
Martin Pool
8654a161c8 LMHOSTSFILE is now dynamically configured too.
(This used to be commit a779710fff)
2001-11-19 03:12:10 +00:00
Martin Pool
f741f65673 Store some path names in global variables initialized to configure
default, rather than in preprocessor macros.
(This used to be commit 79ec88f0da)
2001-11-19 02:49:53 +00:00
Jeremy Allison
f5a5acec33 Fixed WINS re-registration bug. Don't ask..... :-(. It was in my code :-).
Jeremy.
(This used to be commit 129c640810)
2001-10-08 19:39:07 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Volker Lendecke
f7fb26f675 How often did I read the CVS commit message
"Always compile before commit" :-((

Volker
(This used to be commit 69a3277fc5)
2001-09-27 16:28:50 +00:00
Volker Lendecke
29d3318437 From 2.2.
Volker
(This used to be commit 50ea73426f)
2001-09-26 16:47:02 +00:00
Simo Sorce
1f312492ec move to SAFE_FREE()
(This used to be commit 1446a1562b)
2001-09-17 04:35:51 +00:00
Andrew Tridgell
4d65bc0949 convert more code to use XFILE
(This used to be commit fd24265c06)
2001-09-10 13:09:54 +00:00
Andrew Tridgell
79139fe8d8 convert more code to use XFILE
(This used to be commit fe6679dffb)
2001-09-10 12:46:42 +00:00
Andrew Tridgell
b12a4dd9b6 declare dbf in one spot
(This used to be commit f41c3bb80f)
2001-09-10 12:14:18 +00:00
Andrew Tridgell
b30e75692d replaced stdio in many parts of samba with a XFILE. XFILE is a cut-down
replacemnt of stdio that doesn't suffer from the 8-bit filedescriptor
limit that we hit with nasty consequences on some systems

I would eventually prefer us to have a configure test to see if we need
to replace stdio, but for now this code needs to be tested widely so
I'm enabling it by default.
(This used to be commit 1af8bf34f1)
2001-09-10 11:08:57 +00:00
Andrew Tridgell
9a9ac2739b got rid of USE_TDB_MMAP_FLAG as its not needed any more
(This used to be commit c26e0d3f27)
2001-09-06 22:08:19 +00:00
Herb Lewis
7528728071 merge profile data changes from 2.2
(This used to be commit c105859304)
2001-09-05 18:43:55 +00:00
Tim Potter
259d59084d Send a MSG_SMB_SAM_REPL when a UAS/SAM change netlogon message is
received.
(This used to be commit b7cf14bf84)
2001-08-28 06:08:31 +00:00
Christopher R. Hertel
7c09aa553d Same as nmbd.c. These now test wins_srv_count() instead of lp_wins_server
to determine whether the 'wins server' parameter is set.
(This used to be commit 5b975d3a9c)
2001-08-26 06:43:39 +00:00
Christopher R. Hertel
7fed75b4cb Instead of checking lp_wins_server() to see if a WINS server was specified,
nmbd now calls wins_srv_count().  This returns the number of WINS servers
specified in the 'wins server' parameter.  The return value will be zero if
'wins server' is not specified.

Quick change to make room for WINS failover.
(This used to be commit 0777ebc04b)
2001-08-26 06:24:03 +00:00
Tim Potter
c1f0d99013 Process the SAM/UAS change notification message.
(This used to be commit efcbcfaa48)
2001-08-24 19:28:08 +00:00
Tim Potter
2236c671a0 Only register the #1b name if we are ROLE_DOMAIN_PDC rather than
lp_domain_master()
(This used to be commit b8fe147430)
2001-08-24 19:21:40 +00:00
Jeremy Allison
6597e1bd26 Fixes for varargs problems with std c.
Fix from Rick Lake <rwlake@anp.nl> for QNX.
Jeremy.
(This used to be commit c13b77eb35)
2001-07-30 17:52:26 +00:00
Jeremy Allison
c6b51500af Fixes from Jens-Uwe.Walther@force.de to make the -l option behave
consistently.
Jeremy.
(This used to be commit f591ca9f25)
2001-07-17 20:42:59 +00:00
Christopher R. Hertel
bb8c1be67c Andrew B and I were commiting the same fix at the same time in different
trees.  This change simply brings HEAD and 2.2 in line with one another.
Otherwise the code would be differnt but the meaning would be the same,
which is awkward.
Chris 'fifty-seven commits per line changed' Hertel -)-----
(This used to be commit bbf14e2d4e)
2001-07-10 18:05:29 +00:00
Andrew Bartlett
f8f1d9d5c3 Fix tree breakage, the last change was entirly non-portable, and we already
have this nice variable to do exactly this...
(This used to be commit cad6f53433)
2001-07-10 17:14:52 +00:00
Christopher R. Hertel
973a78c2db Fix from John Malmberg. When I added the additional information to the
debug block that reports multiple query responses I did not notice that
the local answer_ip variable was only selectively set.

Chris -)-----
(This used to be commit 22ea0770d8)
2001-07-10 16:10:04 +00:00
Andrew Tridgell
527e824293 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
(This used to be commit c41fc06376)
2001-07-04 07:36:09 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00
Simo Sorce
89ee12d373 - sorry, forgot to test a pointer
(This used to be commit 1aef522452)
2001-07-03 00:23:38 +00:00
Simo Sorce
ef6c9d7425 "netbios aliases" and "interfaces" options change from P_STRING to P_LIST
(This used to be commit db36ed1d80)
2001-07-01 23:24:08 +00:00
Christopher R. Hertel
9e7896144a Added info to some of the debug messages to get a better handle on a problem
people are reporting regarding multiple responses to queries on <1D> names.

There should only ever be one LMB but some users are seeing multiple replies
to queries for the LMB name.  This is probably due to nodes on the LAN that
have NetBIOS over NetBEUI and/or IPX enabled.  Previously, the debug message
did not include the IP address associated with the name.  It *did* include
the source address of the packet, but in the examples I've seen all of these
were the same, eg:

[2000/06/22 11:58:25, 0] nmbd/nmbd_namequery.c:query_name_response(93)
query_name_response: Multiple (2) responses received for a query on subnet
129.130.10.136 for name NT.CIS.KSU.EDU<1d>. This response was from IP
129.130.10.24
 [2000/06/22 11:58:25, 0] nmbd/nmbd_namequery.c:query_name_response(93)
query_name_response: Multiple (3) responses received for a query on subnet
129.130.10.136 for name NT.CIS.KSU.EDU<1d>. This response was from IP
129.130.10.24
 [2000/06/22 11:58:25, 0] nmbd/nmbd_namequery.c:query_name_response(93)
query_name_response: Multiple (4) responses received for a query on subnet
129.130.10.136 for name NT.CIS.KSU.EDU<1d>. This response was from IP
129.130.10.24
[2000/06/22 11:58:25, 0] nmbd/nmbd_namequery.c:query_name_response(93)
query_name_response: Multiple (5) responses received for a query on subnet
129.130.10.136 for name NT.CIS.KSU.EDU<1d>. This response was from IP
129.130.10.24

Note that all of the above are reported as having come from 129.130.10.24.
This should never happen.  If 129.130.10.24 is a WINS server it should
send a Negative Name Query Response for a <1D> name query (wierd but true).

So, are all of the above coming from different systems, all of which
think are the LMB?  Are they all coming from one system that is, for some
strange reason, replying five times to the same query?

Anyway, I needed more info so I've changed the debug messages.

Chris -)-----
(This used to be commit 8f2f09af0a)
2001-06-28 20:49:47 +00:00
Andrew Tridgell
b95a294a08 fixed usage of socklen_t and also tidied up SIG_ATOMIC_T, using a typedef instead of a define
(This used to be commit e2ecff419f)
2001-06-25 02:53:13 +00:00
Jeremy Allison
7d72ec3eda Mismatched format and args.
Jeremy.
(This used to be commit d57feb2c85)
2001-04-27 22:19:25 +00:00
Jeremy Allison
30c02f9871 More paranioa fixes against nmbd lengths.
Jeremy.
(This used to be commit 53f35a71c6)
2001-04-25 01:07:33 +00:00
Jeremy Allison
a7e07d149d Fix bad length in dgram.
Jeremy.
(This used to be commit 8bd27845f0)
2001-04-24 23:51:57 +00:00
Jeremy Allison
38227191ed Patch for nmbd core dump in printing debug packets. No length check.
Jeremy.
(This used to be commit eacb96396d)
2001-04-24 18:01:40 +00:00
Jeremy Allison
2ef68c7e92 Merge of Andrew's changes in 2.2.
Jeremy.
(This used to be commit fc76681812)
2001-04-13 19:12:06 +00:00
Jeremy Allison
50e78a9ac8 As Andrew suggested, make smbrun return a fd for a deleted file which can then
be read.
Jeremy.
(This used to be commit e7d59d6de8)
2001-04-13 00:37:00 +00:00
Jeremy Allison
f9a15ce1a6 Got "medieval on our ass" about adding the -1 to slprintf.
Jeremy.
(This used to be commit 94747b4639)
2001-04-08 20:22:39 +00:00
Jeremy Allison
370664344a Fix insure-found parameter size missmatch.
Jeremy.
(This used to be commit 2f658691e4)
2001-03-23 19:01:27 +00:00
Andrew Tridgell
0f2b15707a added option "enhanced browsing"
this allows users to disable the cross-subnet browse extensions that I
added to Samba a couple of years ago. This may be useful for getting
rid of empty workgroups.
(This used to be commit 978980050e)
2001-03-21 04:12:36 +00:00
Jeremy Allison
4ab6182a0f AS/U on a sparc now joins and authenticates against a Samba PDC !
Jeremy.
(This used to be commit 28a0bc5f57)
2001-03-15 00:49:13 +00:00
Jeremy Allison
6c99c38cbf Fixed double fclose() call (I love insure :-).
Jeremy.
(This used to be commit 0a84839dc0)
2001-03-08 22:29:39 +00:00
Herb Lewis
a82df9c673 samba/source/nmbd/nmbd.c change remote_machine name to nmbd instead
of nmb so we write to same log file that
				was originally created as log.nmbd
samba/source/smbd/server.c	change remote_machine name to smbd instead
				of smb so we write to same log file that
				was originally created as log.smbd
samba/source/lib/interface.c	allow binding to all interface IP addresses
				even if on same subnet. This allows you to
				specify which IP's you want in interfaces
				line and use bind interfaces only
(This used to be commit 01dfd59712)
2001-02-15 19:50:34 +00:00
David O'Neill
fcfaebda7f Changes from APPLIANCE_HEAD:
source/smbd/server.c
    source/nmbd/nmbd.c
        - Fixed a very subtle bug with signals. Seems that POSIX requires
          that the signal mask be inhereted. So, if you happen to kick off
          smbd/nmbd from code that has the mask set on SIGUSR1, you lose
          messages.
(This used to be commit b4c98196fc)
2001-01-25 16:36:42 +00:00
Richard Sharpe
92ebc81734 I need a callback arg for cli_NetServerEnum and cli_RNetShareEnum, so I had
to modifiy any routine that calls it to pass NULL and so forth.

Should have no impact. It compiles OK.
(This used to be commit 7f862e387f)
2001-01-04 11:35:55 +00:00
Richard Sharpe
79ad1926d0 We only want to mark mailslot packets as loopback packets if they are to
the DGRAM_PORT, since we want to actually send those to other ports.

They might be for the client library running on the Samba server!
(This used to be commit 05e2dd5e85)
2001-01-03 01:25:05 +00:00
Richard Sharpe
842589582b Make the use of generate_name_trn_id conform to the usage elsewhere ...
(This used to be commit 46a3a56ecf)
2001-01-02 14:24:46 +00:00
Richard Sharpe
39f0f1120f Comment out unused generate_name_trn_id ...
(This used to be commit fb5798e1d9)
2001-01-02 14:00:27 +00:00
Jeremy Allison
901c3224de John Reillys fix for de-registering broadcast names (NT doesn't do this).
Jeremy.
(This used to be commit 245907f2af)
2000-11-17 00:33:06 +00:00
Jeremy Allison
c56301b1d1 Ignore SIGUSR2. Terminate nmbd if we have no interfaces.
Jeremy.
(This used to be commit 580e2e044c)
2000-10-12 21:19:49 +00:00
Jeremy Allison
8582d42646 Ensure browse.dat is written and read in UNIX character set format.
Jeremy.
(This used to be commit 279d0ec656)
2000-10-07 01:15:07 +00:00
Andrew Tridgell
f0ce4f7ae3 - changed the msg_type to be an int instead of an enum so that it is
easier to add new message types to messages.h without breaking old
binaries

- added a MSG_FORCE_ELECTION message to force nmbd to hold an election
(This used to be commit f1c49ca7ce)
2000-09-12 06:13:25 +00:00
Andrew Tridgell
0b2e454703 debug messages now work for nmbd
(This used to be commit 6a503f95b1)
2000-09-11 07:33:44 +00:00
Andrew Tridgell
3689e4ffc1 the first cut of the internal messaging system.
The motivation for this system is to replace the UDP message for
oplocks, but this commit only does the "set debug level" message.
(This used to be commit 2a34ee95f3)
2000-09-11 07:02:43 +00:00
Jeremy Allison
6e150a7ca5 Fix for bind interfaces only sometimes picking the wrong IP address
for a name query. From Steve Langasek <vorlon@netexpress.net>.
Jeremy.
(This used to be commit 9890740121)
2000-08-30 17:34:35 +00:00
Christopher R. Hertel
3c9e410c34 Instead of handing back a string (which might be a DNS name or an IP
string), the wins_srv module now hands back a struct in_addr when it's
called.  It caches the IP address once it has been looked up.  The IP
is cleared (and must be looked up again) if the 'wins server' parameter
is reread, or if the node is marked 'dead'.  A dead node will not be
re-tried for 10 minutes (per a #define in wins_srv.c).

As it was, the code was reading the WINS server name or IP directly from
lp_wins_server.  That's okay, except that if the value was expressed as
a name, then a DNS lookup would be done every time the client wanted to
talk to the server.

I still need to work out the implications of failover regarding the
'unicast subnet' list.

Chris -)-----
(This used to be commit 73aa188320)
2000-07-19 05:32:43 +00:00
Christopher R. Hertel
b35f21fb3a First cut toward adding WINS server failover.
*Note: failover doesn't actually work yet!*  It's just that the code I'm
adding provides all of the pieces necessary.

I do have one big question.  Something that I'll have to ask Jeremy, I'm
thinkin'.  In nmbd/nmbd_subnetdb.c the IP of the WINS server is used to
set up the Unicast subnet.

...so what happens if the WINS server changes?

My guess is either:
  a) nothing.
  b) I'd have to change the unicast subnet entry whenever the WINS server
     changes.

Urq.

BTW, the lp_wins_server() function no longer returns the WINS server name
or IP.  It returns the list of WINS servers entered in smb.conf.  To get
the currently 'live' WINS server, use the wins_srv() function.

Fun, eh?

Chris -)-----
(This used to be commit cc08bdc74f)
2000-07-19 01:21:30 +00:00
Andrew Tridgell
8843a6379d Linux kernel oplocks now seem to work, but need a _lot_ of testing
I had to modify sys_select() to not loop on EINTR. I added a wrapper
called sys_select_intr() which gives the old behaviour.
(This used to be commit b28cc4163b)
2000-06-11 05:57:58 +00:00
Andrew Tridgell
ddc9b8b406 more merging
it is now at the stage that winbindd can compile in the head branch,
but not link
(This used to be commit d178c00aae)
2000-05-10 09:49:55 +00:00
Jeremy Allison
a7a4f4f67c Fixed wild pointer diff found by insure.
Jeremy.
(This used to be commit 158d9cada8)
2000-05-02 23:56:24 +00:00
Jeremy Allison
693ffb8466 Added sys_fork() and sys_getpid() functions to stop the overhead
of doing a system call every time we want to just get our pid.
Jeremy.
(This used to be commit 148628b616)
2000-05-02 02:23:41 +00:00
Andrew Tridgell
84f65e6be6 don't qsort a list less than 2 entries
(This used to be commit 6faa3c23ae)
2000-04-25 00:45:42 +00:00
Andrew Tridgell
f0442220fa fixed a parameter bug found by insure
(This used to be commit a559a8066f)
2000-04-24 11:30:45 +00:00
Jeremy Allison
6259f51dd9 This is a *big* checkin that may break some things, but implements the
new open mechanism Andrew & I discussed.

config.sub:
configure: Included the QNX patch.

include/vfs.h:
smbd/vfs-wrap.c:
smbd/vfs.c: Added ftruncate vfs call (needed).

Note that we will also need locking calls in the vfs (to be added).

lib/util_unistr.c:
nmbd/nmbd_processlogon.c: Fix for NT domain logons causing nmbd to core dump.
                          Also fix for sidsize DOS bug.

locking/locking.c: Check value of ret before using it for memdup.

printing/printing.c: Convert print_fsp_open to return an allocated fsp.

rpc_server/srv_lsa.c: Fix for NT domain logons.

I have removed all use of lp_share_modes() from the code (although I
left the parameter in the table for backwards compatibility). It no longer makes
sense for this to exist.

smbd/close.c: Removed lp_share_modes().
smbd/fileio.c: Fixed parameters to unlock_share_entry call in panic code.
smbd/files.c: Correctly set the unix_ERR_code to ERRnofids on fsp allocation fail.

smbd/nttrans.c:
smbd/reply.c:
smbd/trans2.c: Changed all occurrences of open_file_shared/open_directory/
               open_file_stat to return an fsp from the call.

smbd/open.c: Changed all occurrences of open_file_shared/open_directory/
             open_file_stat to return an fsp from the call.

In addition I have fixed a long standing race condition in the deny mode
processing w.r.t. two smbd's creating a file. Andrew, please note that
your original idea of using open with O_EXCL in this case would not work
(I went over the races very carefully) and so we must re-check deny modes
*after* the open() call returns. This is because there is a race between
the open with O_EXCL and the lock of the share mode entry. Imagine the
case where the first smbd does the open with O_EXCL and a deny mode of DENY_ALL,
but is pre-empted before it locks the share modes and creates the deny
mode entry for DENY_ALL. A second smbd could then come in with O_RDONLY
and a deny mode of DENY_NONE and the two opens would be allowed.

The *only* way to fix this race is to lock the share modes after the
open and then do the deny mode checks *after* this lock in the case
where the file did not originally exist.

This code will need extensive testing but seems to initially work.

Jeremy.
(This used to be commit ab0ecc39d6)
2000-04-22 00:33:16 +00:00
Andrew Tridgell
7b1c5392f7 updates from the TNG branch
(This used to be commit 36fb5bc72f)
2000-04-18 03:34:27 +00:00
Luke Leighton
f5da7470c3 logic for domainsidsize is if size is zero, there's no sid, so don't
advance over it and 4-byte align.

this _used_ to be "regardless of domainsidsize, advance by domainsidsize+3"
which is wrong.
(This used to be commit 5086e6425f)
2000-04-12 05:56:16 +00:00
Jeremy Allison
f6be38cae2 include/byteorder.h: ALIGN4/ALIGN2 macros.
include/includes.h: Added SMB_BIG_UINT_BITS.
lib/util.c: Removed align2/align4 - use macros.
libsmb/namequery.c: Use ALIGN2.
locking/locking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
                   Needed to move to hiding POSIX locks at a lower layer.
nmbd/nmbd_processlogon.c: Use ALIGN2/ALIGN4 macros.
smbd/blocking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
smbd/reply.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
Jeremy.
(This used to be commit 491eea8a20)
2000-04-11 19:44:54 +00:00
Andrew Tridgell
420099f96f add a comment
(This used to be commit 0da440c8fe)
2000-04-11 14:25:04 +00:00
Andrew Tridgell
55fa1630e4 some updates to the process logon code to reflect lukes latest
research plus some cleanups
(This used to be commit 1682faa1b0)
2000-04-11 14:11:14 +00:00
Andrew Tridgell
2fa922611b finally got sick of the "extern int Client" code and the stupid
assumption that we have one socket everywhere

while doing so I discovered a few bugs!

1) the clientgen session retarget code if used from smbd or nmbd would
cause a crash as it called close_sockets() which closed our main
socket! fixed by removing close_sockets() completely - it is unnecessary

2) the caching in client_addr() and client_name() was bogus - it could
easily get fooled and give the wrong result. fixed.

3) the retarget could could recurse, allowing an easy denial of
service attack on nmbd. fixed.
(This used to be commit 5937ab14d2)
2000-04-11 13:55:53 +00:00
Jeremy Allison
a49d86ccc1 Additional fix for nmbd and 127.0.0.1 interface.
Jeremy.
(This used to be commit 715fa7ea8c)
2000-04-03 17:12:25 +00:00
Jeremy Allison
9966573076 Cause nmbd to ignore loopback interface when constructing its interface list. This is done by default when interfaces are probed, but if someone
explicitly adds 127.0.0.1 to the interfaces line for smbd, then nmbd would
start to try and register names on it. This was not good :-(.
Jeremy.
(This used to be commit cc3ad82521)
2000-03-29 21:30:52 +00:00
Andrew Tridgell
1bb5664127 damn, the test was the wrong way around for short_resuest
(This used to be commit 1ac46c4011)
2000-03-28 03:03:34 +00:00
Andrew Tridgell
18bc76a0c6 changed the definition of dos_PutUniCode
the previous definition could result is us overflowing a buffer. The
null termination was always added yet the size returned did not
include the null termination.

the new function takes a BOOL null_terminate, and always returns the
total number of bytes consumed by the string.
(This used to be commit 426c904333)
2000-03-27 12:38:45 +00:00
Andrew Tridgell
6570b48d73 the final part of the nmbd merge between head and tng - this gets the
GETDC stuff sorted out
(This used to be commit f6b56ae93e)
2000-03-27 12:19:58 +00:00
Andrew Tridgell
61302f54bd fixed the hanlding of recursion desired when sending packets from
nmbd. It does NOT follow the rule that packets to the wins server have
rec_des set (I know that we have postulated this in the past). Please
don't screw with this unless you do careful testing from WinXX
clients.

Luke and I spent a couple of hours today getting this right (it was
wrong in both TNG and HEAD)
(This used to be commit 9eda2e27b7)
2000-03-27 08:34:26 +00:00
Luke Leighton
3a290ce80c rename static reload_services function to reload_nmbd_services because
it clashes with other reload_services definitions.
(This used to be commit affaf9c541)
2000-03-27 00:52:33 +00:00
Andrew Tridgell
4e7af2b3b5 when doing a "secure nbns" wack response and check with owner for a
multihomed registration we were sending the packet to the wrong host!
We sent it to the person trying to register rather than to the person
who currently holds the name. That means we were not secure and we
could allow two people to register the same name.

Jeremy, you may wish to merge this change into 2.0.X
(This used to be commit 94ca1d1250)
2000-03-26 23:16:07 +00:00
Andrew Tridgell
b18791b860 merge from tng ...
reload services can be static
(This used to be commit b13a903720)
2000-03-26 23:13:12 +00:00
Jeremy Allison
9db96b7646 lib/system.c: Fixed gcc warnings.
nmbd/nmbd_processlogon.c: Use "True" and "False" instead of 1 and 0.
Others - preparing for multiple pdu write code.
Jeremy.
(This used to be commit 9f879ec396)
2000-02-23 02:02:33 +00:00
Luke Leighton
f7324464b1 richard got the short request for GETDC right (hooray!) win9x _and_ nt
now work.
(This used to be commit 27ef178926)
2000-02-22 21:00:01 +00:00
Jeremy Allison
40122f6e32 Modified auto alignment of ud[] struct on stack to be declared as an
array of pointers. This should cause alignment on a correct boundary..
Spotted by Darren Reed <darrenr@telnetmedia.com>.
Jeremy.
(This used to be commit 91f4d06753)
2000-01-28 23:47:31 +00:00
Andrew Tridgell
171da4d787 this looks like a big commit, but it isn't really :)
This fixes our netbios scope handling. We now have a 'netbios scope' option
in smb.conf and the scope option is removed from make_nmb_name()

this was prompted by a bug in our PDC finding code where it didn't append
the scope to the query of the '*' name.
(This used to be commit b563be824b)
2000-01-07 06:55:36 +00:00
Andrew Tridgell
5e9f559187 implemented talloc() as described on samba-technical. This fixes the
lp_string() bug properly.

we still need to add lp_talloc_free() calls in all the main event
loops, I've only put it in smbd and nmbd thus far.
(This used to be commit aa7f815525)
2000-01-05 06:36:36 +00:00
Andrew Tridgell
632b4f806e added suppport for unexpected udp/138 packets
I also fixed up the lookup_pdc_name() code so that it now works, even
with a NT server that insists on replying to udp/138.

The method I used to match packets was to use the mailslot string as a
datagram ID. The true dgm_id doesn't work as NT doesn't set it
correctly. uggh.

PS: Jeremy, I had to change your code quite a bit, are you sure this
worked with a Samba PDC?? The code looked broken, it got the offsets
wrong in the SMB portion of the packet and filled in the IP
incorrectly.
(This used to be commit 32f66f4ea6)
2000-01-03 06:30:50 +00:00
Andrew Tridgell
d705b62141 got rid of mem_man
yamd is much better, and doesn't require any source code changes
if you haven't seen yamd then take a look at
	http://www3.hmc.edu/~neldredge/yamd/
its excellent!
(This used to be commit 25b13f8b79)
2000-01-03 03:31:41 +00:00
Andrew Tridgell
574788039f added the unexpected packet database (unexpected.tdb)
this means "nmblookup -S" now always works, even with broken servers
the database stores all unexpected replies and these can be accessed
by any client.
while doing this I cleaned up a couple of functions, and put in place
a better trn_id generator. in most places the code got quite a bit
simpler due to the addition of simple helper functions.

I haven't yet put the code in to take advantage of this for pdc
replies - that will be next. Jeremys pdc finding code will then work :)
(This used to be commit 280e6359d3)
2000-01-03 03:17:16 +00:00
Andrew Tridgell
9a781a8c6d - added tdb_flags option to tdb_open()
- added TDB_CLEAR_IF_FIRST flag to clear the database if this is the
  first attached process. Useful for non-persistent databases like our
  locking area (this will also make upgrades to new database layouts easier)
- use lock_path() in a couple of places
- leave connections database open while smbd running
- cleaned up some tdb code a little, using macros for constants
(This used to be commit 00e9da3ca5)
2000-01-02 23:00:27 +00:00
Andrew Tridgell
3db52feb1f first pass at updating head branch to be to be the same as the SAMBA_2_0 branch
(This used to be commit 453a822a76)
1999-12-13 13:27:58 +00:00
Luke Leighton
a76fee7333 more cli_session_setup() calls. what the heck are these doing???
they should all be replaced with cli_establish_connection().

created cli_use_wait_keyboard() which waits on multiple cli_states
and swallows session keepalives.
(This used to be commit fcc39b3f4f)
1999-12-01 22:06:53 +00:00
Luke Leighton
6ddfc68e04 sys_select added one more argument (read, write selectors).
(This used to be commit e4d92ff9df)
1999-12-01 02:15:14 +00:00
Luke Leighton
161c11e4bc - bug in nmbd registering DOMAIN_NAME<1c> to WINS server; recursion
desired flag MUST be set in any NBT UDP packets sent to a WINS
  server, else they will go to the WINS client side of the NT NetBIOS
  kernel instead, and will get trashed.

- added \PIPE\browser server-side code.
(This used to be commit 8e406c1fa2)
1999-11-19 01:01:07 +00:00
Luke Leighton
da517a3ff4 responses to UDP samquery go back to SERVER<00> not DOMAIN<1c>, the
request name.

modified createuser rpcclient command to examine name being added.  if it
ends in a $, assume that a workstation trust account is being added.
(This used to be commit 4aea261cb0)
1999-11-18 23:15:45 +00:00
Luke Leighton
ccc8585567 added regqueryval command (experimental) to get reg_io_q_info() and
reg_io_r_info() working properly.  previously they weren't well
understood (well, they were the first of the registry functions i did,
back in december 97, ok??? :-)

set ntversion to 0x1 in SAMQUERY, so that we reply same as NT4 srv.
(This used to be commit 98ddeaf442)
1999-11-18 00:26:11 +00:00
Luke Leighton
b231d2fafa - added DCE/RPC "fault" PDU support.
- disabled (AGAIN) the GETDC "if (MAILSLOT\NTLOGON)" code that will get
NT5rc2 to work but WILL break win95 (AGAIN).  this needs _not_ to be
re-enabled but to be replaced with a better mechanism.

- added SMBwrite support (note: SMBwriteX already existed) as NT5rc2 is
sending DCE/RPC over SMBwrite not SMBwriteX.
(This used to be commit 25c70e3c98)
1999-11-15 22:11:10 +00:00
Matthew Chapman
8592314480 Fix for Win95 not being able to find PDC (for User/Server Manager, and
password change requests), from Michael Stockman <pgmtekn@algonet.se>.
GETDC on \MAILSLOT\NET\NETLOGON necessarily returns less information
than the NTLOGON version.
(This used to be commit 8a603a8793)
1999-08-08 04:51:13 +00:00
Matthew Chapman
9c2520e6cd Trying to improve DC location & browsing performance for the average user
who doesn't know what an LMB or DMB is.

* check_master_browser_exists now performs the check the first time
around, so if there is indeed no master browser then Samba takes up the job
much faster.

* Upped default OS level to 32. There is no reason why some stupid little
Windows box should become LMB instead of a Samba *server*.

* "domain master" now defaults to "auto". Currently this attempts to
become DMB iff Samba is the PDC (ala Windows NT). "preferred master" also
defaults to "auto", which enables preferred master iff Samba is DMB.

* lp_server_role now just returns the predetermined role, rather than
working it out each time, since the server role is becoming very heavily
used (esp for the BDC code).
(This used to be commit 4a23a358b5)
1999-04-11 10:23:19 +00:00
Luke Leighton
5a6db490ea SAMLOGON query - alignment issue is beginning to get to me.
(This used to be commit baf55934dc)
1999-03-17 21:35:10 +00:00
Luke Leighton
7f913623be alignment issue for UDP SAMLOGON response.
(This used to be commit 9d01e9d86a)
1999-03-17 19:48:29 +00:00
Luke Leighton
60bfe3819e alignment issue in UDP SAMLOGON response.
(This used to be commit de290627f0)
1999-03-09 02:03:39 +00:00
Luke Leighton
a3c6e96a22 mods to allow inter-domain trust accounts to be added to SAM database
using smbpasswd command.
(This used to be commit 62d499f832)
1999-03-09 01:21:57 +00:00
Luke Leighton
aecbc5b5d3 oh dear, it's this one again. removed check for MAILSLOT\NTLOGON because
it's wrong.  i've seen a packet from nt client on MAILSLOT\NETLOGON
with appended undocumented unicode tacked on the end and the response
contained undocumented unicode tacked on the end.
(This used to be commit 74c7d626cd)
1999-03-09 01:20:08 +00:00
Matthew Chapman
2737f26ad6 Always null-terminate strings.
Also some string length and sizeof(pointer) corrections.
(This used to be commit ce24191939)
1999-02-15 05:33:30 +00:00
Matthew Chapman
fd96929ec1 UNICODE cleanup (see lib/util_unistr.c).
No more ugly static library buffers and all functions take a destination
string length (especially unistrcpy was rather dangerous; we were only
saved by the fact that datagrams are limited in size).
(This used to be commit a1d39af1ce)
1999-02-12 00:16:09 +00:00
Jeremy Allison
3e7039349f Fix bug with nmbd running wild due to recursion in retransmit_or_expire_response_records().
Jeremy.
(This used to be commit d5f05b4fae)
1998-12-17 21:41:28 +00:00
Luke Leighton
58a0cbc0c8 oops, util_pwdb.c appears to be included in PASSDB_OBJ not LIB_OBJ.
(This used to be commit ca10eb4490)
1998-12-09 16:30:37 +00:00
Luke Leighton
1f989cda94 need to initialise global_myworkgroup
(This used to be commit 501617307f)
1998-12-09 16:23:57 +00:00
Andrew Tridgell
cfba976fc2 removed the SID stuff from the head branch as well.
This allows the removal of PASSDB_OBJ, RPC_CLIENT_OBJ and
RPC_PARSE_OBJ from nmbd in the head branch.

so nmbd just went on a diet :)
(This used to be commit be697c9ef0)
1998-12-09 06:35:37 +00:00
Luke Leighton
8d08fb7323 jean-f spotted race condition on generation of sam sid, from starting
nmbd and smbd.  nmbd is now client: smbd is solely responsible for
creating sam_name.SID
(This used to be commit 50fa4822df)
1998-12-03 17:38:20 +00:00
Luke Leighton
04e382fb16 rpc_samr.h parse_samr.c srv_samr.c :
samr_query_aliasmembers (cool!)

util_pwdb.c sids.c nmbd.c server.c smbpasswd.c swat.c :

	pwdb_initialise(BOOL is_server) now creates / reads DOMAIN_NAME.SID
	if is_server is True, and does LsaQueryInfoPolicy(levels 3 and 5)
	to obtain member and pdc sids.
(This used to be commit 3e1eb4f26b)
1998-12-01 19:10:44 +00:00
Luke Leighton
30038de462 weekend work. user / group database API.
- split sam_passwd and smb_passwd into separate higher-order function tables

- renamed struct smb_passwd's "smb_user" to "unix_user".  added "nt_user"
plus user_rid, and added a "wrap" function in both sam_passwd and smb_passwd
password databases to fill in the blank entries that are not obtained
from whatever password database API instance is being used.

NOTE: whenever a struct smb_passwd or struct sam_passwd is used, it MUST
be initialised with pwdb_sam_init() or pwd_smb_init(), see chgpasswd.c
for the only example outside of the password database APIs i could find.

- added query_useraliases code to rpcclient.

- dealt with some nasty interdependencies involving non-smbd programs
and the password database API.  this is still not satisfactorily
resolved completelely, but it's the best i can do for now.

- #ifdef'd out some password database options so that people don't
mistakenly set them unless they recompile to _use_ those options.

lots of debugging done, it's still not finished.  the unix/NT uid/gid
and user-rid/group-rid issues are better, but not perfect.  the "BUILTIN"
domain is still missing: users cannot be added to "BUILTIN" groups yet,
as we only have an "alias" db API and a "group" db API but not "builtin-alias"
db API...
(This used to be commit 5d5d7e4de7)
1998-11-29 20:03:33 +00:00
Jeremy Allison
768761820e Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls.
Tidied up some of the mess (no other word for it). Still doesn't
compile cleanly. There are calls with incorrect parameters that
don't seem to be doing the right thing.

This code still needs surgery :-(.

Jeremy.
(This used to be commit 18ff93a9ab)
1998-11-17 20:50:07 +00:00
Luke Leighton
74d539f557 - group database API. oops and oh dear, the threat has been carried out:
the pre-alpha "domain group" etc parameters have disappeared.

- interactive debug detection

- re-added mem_man (andrew's memory management, detects memory corruption)

- american spellings of "initialise" replaced with english spelling of
  "initialise".

- started on "lookup_name()" and "lookup_sid()" functions.  proper ones.

- moved lots of functions around.  created some modules of commonly used
  code.  e.g the password file locking code, which is used in groupfile.c
  and aliasfile.c and smbpass.c

- moved RID_TYPE_MASK up another bit.  this is really unfortunate, but
  there is no other "fast" way to identify users from groups from aliases.
  i do not believe that this code saves us anything (the multipliers)
  and puts us at a disadvantage (reduces the useable rid space).
  the designers of NT aren't silly: if they can get away with a user-
  interface-speed LsaLookupNames / LsaLookupSids, then so can we.  i
  spoke with isaac at the cifs conference, the only time for example that
  they do a security context check is on file create.  certainly not on
  individual file reads / writes, which would drastically hit their
  performance and ours, too.

- renamed myworkgroup to global_sam_name, amongst other things, when used
  in the rpc code.  there is also a global_member_name, as we are always
  responsible for a SAM database, the scope of which is limited by the role
  of the machine (e.g if a member of a workgroup, your SAM is for _local_
  logins only, and its name is the name of your server.  you even still
  have a SID.  see LsaQueryInfoPolicy, levels 3 and 5).

- updated functionality of groupname.c to be able to cope with names
  like DOMAIN\group and SERVER\alias.  used this code to be able to
  do aliases as well as groups.  this code may actually be better
  off being used in username mapping, too.

- created a connect to serverlist function in clientgen.c and used it
  in password.c

- initialisation in server.c depends on the role of the server.  well,
  it does now.

- rpctorture.  smbtorture.  EXERCISE EXTREME CAUTION.
(This used to be commit 0d21e1e609)
1998-11-17 16:19:04 +00:00
Jeremy Allison
24ca89bfb0 Removed acconfig.h configure configure.in include/config.h.in: Made smbwrapper not made
by default.
nmbd*: Changed all calls to namestr() to nmbd_namestr() to fix broken FreeBSD include
	   file problem...sigh.
Jeremy.
(This used to be commit 9ee8f39aed)
1998-11-14 01:04:13 +00:00
Jeremy Allison
c082539152 client/client.c: Patch to tidy up file size output.
nmbd/nmbd.c: Someone (a "yank" no doubt :-) Changed instances of "initialise" to
             "initialize". Someone get that man an *English* dictionary.... :-) :-).
Jeremy.
(This used to be commit 6279be7f96)
1998-11-02 18:12:28 +00:00
Luke Leighton
502e2ec3cf removed comment line at end of file
(This used to be commit 5e2fc8b7cc)
1998-11-02 16:20:25 +00:00
Andrew Tridgell
04f2858fd7 took out Lukes change as it breaks domain logons for Win95 clients
(ie. it breaks Sues machine).

Luke, your comment was:

  put unicode strings after SAMLOGON query regardless of whether it's
  an NT mailslot or a non-NT mailslot, after having observed this behaviour
  out of NT machines.

perhaps you could post the relevant tcpdump or netmon capture so we
can see what is going on? I suspect that what you saw isn't exactly
what the win95 boxes are generating. Maybe you saw a GETDCxxx instead
of a GETDC000 ? Maybe we need a switch based on the GETDC request
type?

We won't know unless we see sniffs.
(This used to be commit a2bacc0895)
1998-10-31 07:38:50 +00:00
Christopher R. Hertel
6f61253648 Okay, this is really silly but removing one space from one debug statement
meant that one hex dump would fit within 80 characters in lynx after HTML
conversion.
(This used to be commit c391f076f2)
1998-10-22 22:51:45 +00:00
Christopher R. Hertel
034a12fdcb Minor change.
The debug_browse_data() function does a hex dump of a browser packet.  The
last line is often not a full 16 bytes, which would miss-align the hex
output.  I've added the padding needed to align the hex output.

Chris -)-----
(This used to be commit 9f9b30abab)
1998-10-22 18:07:39 +00:00
Christopher R. Hertel
2356f467d1 Another cosmetic change.
When dumping the wins.dat, this module will also write the database
contents to the log file (don't do this if you have a large wins.dat!).
The output was in a sort of tabular format, except that the asctime()
function was used and it always terminates its output with a newline.

I did a bit of fussing, removed the '\n' character, and did my best to
line up the other columns.  If the output format of asctime() is
different on different systems, then the columns won't line up, but
the output will still look better than it did before.

Chris -)-----
(This used to be commit 57295113fe)
1998-10-22 00:30:41 +00:00
Christopher R. Hertel
88a0a8c088 Changed the debug calls to use the newer debug macros. This allowed me to
break up some very long lines in both the code and the output.  The change
is mostly cosmetic, but should improve log file readability.
(This used to be commit fc4e0148eb)
1998-10-21 17:26:54 +00:00
Luke Leighton
9307940876 fixing smbd encrypted rpcs (data lens, alloc hints, sequence nums argh).
put unicode strings after SAMLOGON query regardless of whether it's
an NT mailslot or a non-NT mailslot, after having observed this behaviour
out of NT machines.
(This used to be commit c101113ec2)
1998-10-21 01:35:01 +00:00
Andrew Tridgell
f36d5c8bbf get type of callback right
(This used to be commit 327eba774e)
1998-10-05 03:53:25 +00:00
Jeremy Allison
0ccf4104a1 Missed one removed multi-statement line. Grrr.
Jeremy.
(This used to be commit 7958787d9b)
1998-09-29 17:17:48 +00:00
Jeremy Allison
da0c1ef08e Fixed bug introduced by me in dead code elimination.
Bug was caused by multiple C statements on a line.
IMHO this is a *BUG* and will be treated as such....
Fixed all such multiple statements in this file.
Jeremy.
(This used to be commit ea3ab46f12)
1998-09-29 17:16:15 +00:00
Alexandre Oliva
a2d7f765e8 get away with dummy and .dummy files
(This used to be commit 90a8a02484)
1998-09-29 04:52:17 +00:00
Jeremy Allison
cf3a9741dc Changes to test in configure if capabilities are enabled on a system.
Changes to get Samba to compile cleanly with the IRIX compiler
with the options : -fullwarn -woff 1209,1174 (the -woff options
are to turn off warnings about unused function parameters and
controlling loop expressions being constants).
Split prototype generation as we hit a limit in IRIX nawk.
Removed "." code in smbd/filename.c (yet again :-).
Jeremy.
(This used to be commit e0567433bd)
1998-09-28 21:43:48 +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
5f7ee36056 Makefile.in: Fixed bug with continuation line causing proto to fail.
Added $(PROGS) $(SPROGS) as targets for make clean.
acconfig.h: Added HAVE_IRIX_SPECIFIC_CAPABILITIES.
configure.in: Added sys/capability.h header check.
              Added function checks for srandom random srand rand.
              Added HAVE_IRIX_SPECIFIC_CAPABILITIES test.
includes.h: Added #include <sys/capability.h>.
ntdomain.h: Moved struct acct_info into here from smb.h
smb.h: Added KERNEL_OPLOCK_CAPABILITY define.
       Moved enum action_type into rpcclient.h
       Moved struct cli_state into client.h
       Moved struct nt_client_info, struct tar_client_info, struct client_info
             into rpcclient.h
lib/genrand.c: Changed to use sys_random() & friends.
lib/smbrun.c: Lose capabilities after fork.
lib/system.c: Added set_process_capability(), set_inherited_process_capability()
              sys_random(), sys_srandom().
lib/util.c: Added Ander's EFBIG lock check to fcntl_lock for 64 bit access to an
            32 bit mounted NFS filesystem.
nmbd/nmbd.c: Changed to use sys_random() & friends.
nmbd/nmbd_browsesync.c: Changed to use sys_random() & friends.
passdb/ldap.c: Missed one pdb_encode_acct_ctrl call.
passdb/passdb.c: Changed to Ander's code for ' ' characters.
passdb/smbpass.c: Added Ander's code to reset ACB_PWNOTREQ.
script/mkproto.awk: Added 'long' to prototypes.
smbd/chgpasswd.c: Lose capabilities after fork.
smbd/open.c: Do the mmap *after* the kernel oplock.
smbd/oplock.c: Removed stub code from kernel oplock path.
               Added set_process_capability(), set_inherited_process_capability() calls.
smbd/reply.c: Initialize count = 0, offset = 0.
smbd/server.c: Added set_process_capability(), set_inherited_process_capability() calls.
tests/summary.c: Ensure we have RANDOM or RAND.
utils/smbpasswd.c: Added Ander's code to reset ACB_PWNOTREQ.
utils/torture.c: Changed to use sys_random() & friends.

Jeremy.
(This used to be commit e8be306f23)
1998-09-25 23:40:49 +00:00
Luke Leighton
66d5d73a5d added rpcclient program
(This used to be commit aa38f39d67)
1998-09-25 21:01:52 +00:00
Alexandre Oliva
ac39ce3eba replace getpass() with getsmbpass() if getsmbpass.c compiles
(This used to be commit 9a5bdf5c1b)
1998-09-21 11:34:44 +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
2e6f6bc7f8 oops ... I got the filenames wrong in my cleanup of the wins database
save, so it started saving weird filenames (from an unitialised
fstring).

chaos reigns!
(This used to be commit 20a550d61e)
1998-09-18 13:52:30 +00:00
Jeremy Allison
1e17cbd2a3 nmbd/nmbd_winsserver.c: Fixed printf style warning.
script/mkproto.awk: Added SMB_BIG_UINT.
Jeremy.
(This used to be commit c22c40f0ca)
1998-09-18 00:12:15 +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
Andrew Tridgell
c8e6aa6dc1 fixed another potential fork bomb where the wins file becomes
non-writeable for some reason.
(This used to be commit 9edd43dcd6)
1998-09-17 08:35:07 +00:00
Andrew Tridgell
d66a657f90 fixed the nmbd fork bomb. It was a silly mistake, as
expected. wins_write_database() didn't exit after doing its stuff, so
when it returned you had two copies of nmbd :)
(This used to be commit 5e6488d483)
1998-09-17 08:27:46 +00:00
Andrew Tridgell
1eef953aca fixed a typo in my last commit
(This used to be commit 31b4048362)
1998-09-17 08:23:00 +00:00
Andrew Tridgell
e959f2e232 fixed a potential problem with wins_write_database() child processes.
In sig_term() we were calling wins_write_database(0) which would fork a
child. This child might then get killed by the same process killing
off the parent. That process would then fork another child etc.

The solution is to pass a "background" flag to wins_write_database(0)
and only fork if this is set.
(This used to be commit 1e1a512e3f)
1998-09-17 06:36:08 +00:00
Andrew Tridgell
42edee90bf fixed a bug in the wins database writer that caused the database to be
written continuously rather than once every 5 seconds (at most).

also changed it to 20 seconds :)
(This used to be commit 1b07de7079)
1998-09-10 04:00:09 +00:00
Christopher R. Hertel
5de3c13680 Copyright notices written to debug logs are now through 1998.
Chris -)-----
(This used to be commit ac13c29d46)
1998-09-09 16:37:54 +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
Andrew Tridgell
148691b1c5 we are never interested in SIGPIPE so just ignore (block) it
always. Don't even install a handler.
(This used to be commit 72c383f4b7)
1998-09-02 05:00:47 +00:00
Andrew Tridgell
a2450e6fb3 I looked at the refresh issue a bit more and discovered that Samba
also doesn't switch to a registration if a refresh fails, instead the
name is removed! This makes it even more imortant that a Samba WINS
server accepts refresh requests as registration requests if the name
is not registered. I've gone ahead and implemented this.
(This used to be commit 07f825fc94)
1998-08-31 09:38:50 +00:00
Andrew Tridgell
5e20600e54 minor fixes to the DMB<->DMB sync code. We now get the dmb name from
the local_master name on the unicast subnet if it is unknown.
(This used to be commit 222b6d90e0)
1998-08-31 07:23:11 +00:00
Andrew Tridgell
f8ad53aa03 I realised that my DMB<->DMB sync code has the property that the
amount of network traffic grows as the square of the number of
workgroups. It probably wouldn't have caused problems but to be safe I
changed the code to use random() to decrease the probability of a
DMB<->DMB sync in proportion to the number of known workgroups. This
keeps the nice browse connectivity while making the traffic rise only
linearly with the number of workgroups.
(This used to be commit 685f4ef2e1)
1998-08-31 06:59:23 +00:00
Andrew Tridgell
055e3c88e6 set a maximum name refresh time of 20 minutes.
The previous code was strictly correct, but not very practical. self
names were only refreshed every 3 days. I hit a situation where the
Samba WINS server was restarted after deleting wins.dat and didn't
notice some remote subnets (also running Samba). I realised that the
complete database wouldn't have been rebuilt for 3 days, which is way
too long. In order to recover from WINS restarts we need a much
shorter maximum refresh time.
(This used to be commit 1d23dd0912)
1998-08-31 04:19:31 +00:00
Andrew Tridgell
61b5fd6f32 bounds check next_token() to prevent possible buffer overflows
(This used to be commit 3eade55dc7)
1998-08-31 03:11:42 +00:00
Andrew Tridgell
ab4577f141 added a dest_port parameter to send_mailslot() so we send replies to
the correct port in environments like ip masq.
(This used to be commit 7d455ee637)
1998-08-30 17:04:24 +00:00
Andrew Tridgell
98b0fafc61 a couple of debug lines
(This used to be commit 03d343ddf5)
1998-08-30 16:33:48 +00:00
Andrew Tridgell
998db177ba finished the asynchronous browse synchronisation code. It even seems
to work (not a lot of testing yet though).

Now we just need to deal with people worried about having more than
two nmbd processes sometimes. (the async processes are created on
demand for browse sync, so you'll only see more than 2 occasionally)
(This used to be commit a350a54680)
1998-08-30 15:58:17 +00:00
Andrew Tridgell
f04d5b6b11 we we have successfully done a query on *<1b> from a wins server and
then obtained a node status response we need to remember the server
name of the master browser so that other browse clients asking us for
a workgroup list will get a entry for the master of that workgroup.
(This used to be commit 601f995ffb)
1998-08-30 09:50:45 +00:00
Andrew Tridgell
179e8c66f1 changed the way that name query records are sorted in replies. They
are now sorted by the number of common leading bits in the IP address
with the address of the querying host.
(This used to be commit 4460a1bc6a)
1998-08-30 08:45:23 +00:00
Andrew Tridgell
3debe642bd include our netbios names list and our workgroup in the wins.dat hash
(This used to be commit f555a76df6)
1998-08-30 06:49:14 +00:00
Andrew Tridgell
5a44ce9caa changed the format of the wins.dat file slightly.
It now has a line like this:

VERSION 1 251152

the first number is a version #define in nmbd_winsserver.c and will be
used if we ever have to change the format again.

The second number is a hash of the current interfaces setting. It is
used to detect the case where nmbd is restarted on a machine after the
IP of the machine has changed (or the interfaces list has changed in
any way). When that happens we need to discard the old wins.dat cache
or you end up with chaos. This has bitten quite a few people, they
find that when they move a machine it continues using the old IP for
some things for the next week until the wins entries time out!

I've checked, and the old nmbd can handle the new format, although it
does spit out a spurious error message about the VERSION line. So
users can safely run 2.0alpha then switch back to 1.9.18 without
problems.
(This used to be commit c4a8cdc60a)
1998-08-30 05:43:59 +00:00
Andrew Tridgell
1778debff1 added some defensive programming to nmbd. This mostly means zeroing
areas of memory before freeing them.

While doing this I also found a couple of real bugs. In two places we
were freeing some memory that came from the stack, which leads to
a certain core dump on many sytems.
(This used to be commit c5e5c25c85)
1998-08-30 04:27:26 +00:00
Andrew Tridgell
7731692b74 don't exit on a SIGPIPE
(This used to be commit f18b4e95bf)
1998-08-29 03:10:39 +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
c077bce5c0 nmbd would core dump if a large number of netbios aliases is set. The
problem was a buffer overflow in process_node_status_request().

this really points out a general problem is allocating MAX_DGRAM_SIZE
packets on the stack in nmbd. There must be a better way.
(This used to be commit 7db45f169c)
1998-08-28 14:35:24 +00:00
Christopher R. Hertel
7fe3a42857 nmbd and smbd had different behavior with respect to log files. nmbd would
default to overwrite and smbd would default to append.  Also, the -a option
(actually a toggle, such that "-a -a" would set the default) was documented
as append mode for nmbd, and *overwrite mode* for smbd.

nmbd now defaults to append mode, to match smbd.  The -a option now always
means append, and I've added the -o option to both, meaning overwrite.

Note that the change to nmbd's default behavior may confuse some people.
I've not seen anything about 2.0.0 changes in the WHATSNEW.txt file.
Where would I document a change like this?

Chris -)-----
(This used to be commit b1d374fb14)
1998-08-21 17:21:55 +00:00
Jeremy Allison
e13aeea928 configure: Changes for extra headers.
configure.in: Source for header changes.
client/clitar.c: Fixed isXXX macros & debugs for gcc pedantic compile.
include/config.h.in: Added MEMSET, BZERO, MEMORY, RPCSVC_YPCLNT, STRINGS headers.
include/includes.h: Headers for the above.
include/smb.h: Made SIGNAL_CAST POSIX by default void (*)(int).
lib/access.c: Fixed isXXX macros & debugs for gcc pedantic compile.
lib/charset.c: Fixed isXXX macros & debugs for gcc pedantic compile.
lib/debug.c: Fixed signal functs.
lib/kanji.c: Fixed isXXX macros & debugs for gcc pedantic compile.
lib/smbrun.c: Fixed isXXX macros & debugs for gcc pedantic compile.
lib/util.c: Fixed isXXX macros & debugs for gcc pedantic compile.
libsmb/namequery.c: Fixed isXXX macros & debugs for gcc pedantic compile.
locking/shmem.c: Fixed isXXX macros & debugs for gcc pedantic compile.
locking/shmem_sysv.c: Fixed error messages in sysV stuff.
nmbd/asyncdns.c: Fixed signal functs.
nmbd/nmbd.c: Fixed isXXX macros & debugs for gcc pedantic compile.
passdb/passdb.c: Fixed isXXX macros & debugs for gcc pedantic compile.
passdb/smbpassfile.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/chgpasswd.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/ipc.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/nttrans.c: Fixed fsp code path.
smbd/password.c: fixed HAVE_YP_GET_DEFAULT_DOMAIN problem.
smbd/printing.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/reply.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/server.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/trans2.c: Fixed core dump bug.
smbd/uid.c: Fixed isXXX macros & debugs for gcc pedantic compile.
Jeremy.
(This used to be commit 1b9cbcd02e)
1998-08-15 01:19:26 +00:00
Andrew Tridgell
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
Christopher R. Hertel
ea8631d249 Quick fix for a small problem. If you run 'nmbd -?' you'd get the usage
message *but the daemon would start anyway*.  I've added a call to exit()
in the default: case of the option processing loop.

Chris -)-----
(This used to be commit c69727bd29)
1998-08-11 21:25:55 +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
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
Christopher R. Hertel
103857e8e3 One more minor change to the format of a DEBUG message. I broke up a
very long output line in become_domain_master_query_success().
Chris -)-----
(This used to be commit 9b5d431661)
1998-08-03 18:33:49 +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
Christopher R. Hertel
28900ea26f As per a Andrew's message, I went through and removed the timestring()
timestamps from several DEBUG messages.  The timestamps are redundant now
that DEBUG() provides them automatically.

There are still a few more files to do, but I've got to get home for dinner.

Chris -)-----
(This used to be commit 60286cceca)
1998-07-31 22:39:15 +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
1aa138922e chgpasswd.c: Fixed up debug calls to stop crashes if ptsname failed.
local.h: Kept FSTYPE_STRING as Samba for now.
nmbd_browsesync.c: Added bugfix from Matt Chapman mattyc@cyberdude.com
                   - lmb_browserlist is now a struct ubi_dlList not a
                   struct browse_cache_record *.
server.c:
smb.h:
uid.c:
password.c: Removed attrs code - it is not used anywhere.
Jeremy
(This used to be commit ef1af7fe6d)
1998-07-27 18:50:45 +00:00
Christopher R. Hertel
85474e0780 Cleaned up some testing code and made it more "permanent" looking. The
NetBIOS name lists attached to the subnet records are now managed by
the splay tree code.  I am still working on the WINS database as a
separate issue.  Code is written, it's just a matter of incorporating it.
CRH
(This used to be commit 5ba96ddde4)
1998-07-25 15:45:42 +00:00
Christopher R. Hertel
e6608b5279 Converted the browser database to a ubi_dLinkList. This should reduce code
size, etc.  Also did a bit of work to add comments.
Chris -)-----
(This used to be commit d8b0a2104c)
1998-07-24 19:03:11 +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
3daefed54e chgpasswd.c: Fix from Peter Debus <pdebus@turing.une.edu.au> for Digital UNIX
password change core dump bug.
nmbd_subnetdb.c: Make namelist_entry_compare() static.
nttrans.c: More NT SMB stuff.
Jeremy.
(This used to be commit 1925a29c6b)
1998-07-02 18:49:08 +00:00
Jeremy Allison
06e42fa865 nmbd_elections.c: Removed force elections code to bring into line with 1.9.18.
nmbd_namelistdb.c: Added comment for Chris.
nmbd_subnetdb.c: Went back to Chris's comparison code as with the make_nmb_name
                 change it all works now.
lib/rpc/server/srv_netlog.c: Ensure we return 'account disabled' for disabled
                             accounts, rather than crashing.
Jeremy.
(This used to be commit 4ab3d16827)
1998-06-29 22:50:49 +00:00
Jeremy Allison
fdb124c1cd Added code to do elections when told to do so.
Jeremy.
(This used to be commit a38d903d20)
1998-06-27 01:07:30 +00:00
Jeremy Allison
d8b0a8bab2 nisppass.c: Fixed incorrect parameter usage.
nmbd_become_lmb.c: Add 'force_new_election' parameter to some functions.
                   This allows the start of the election to be done *after*
                   the demotion from local master browser is done.
                   Also changed code so release of 1d name is done
                   immediately to allow other local master to gain it.
nmbd_elections.c: Ensured no elections are run until we have registered
                  the WORKGROUP<1e> name that we must listen on to participate
                  in elections.
nmbd_incomingdgrams.c: Use force_new_election code.
nmbd_namelistdb.c: Make update_name_in_namelist static.
nmbd_subnetdb.c: Fix bug in comparison function. We cannot use memcmp
                   as structure packing may make this fail.
nmbd_packets.c: Ensure that we only send one release packet when
                sending a broadcast packet.
nmbd_workgroupdb.c: Ensure we put the correct value in the ElectionCriterion field.
nmblib.c: Ensure make_nmb_name zero's the struct nmb_name.
Jeremy.
(This used to be commit 1fcb094ba0)
1998-06-27 00:27:44 +00:00
Jeremy Allison
bc39cff279 clitar.c: Fixed gcc warning with comment in /* */ code.
nmbd_winsserver.c: Remember to free packet in multi-homed register code.
                   Use correct query_name_from_wins_server call instead of
                   query_name call in multihomed code.
Jeremy.
(This used to be commit 6e995802fe)
1998-06-25 23:51:28 +00:00
Christopher R. Hertel
7fda0a49cb The function add_name_to_subnet(), in file nmbd_namelistdb.c, returns a
pointer to the newly constructed name list entry.  In most cases, this
return value is ignored.  The two exceptions are in asyncdns.c and
nmbd_winsproxy.c.

Most of the calls which ignored the return value were not cast to void, so
I added the cast.  This helped me sort out which calls really did use the
return value.  I also discovered one case, in nmbd_winsserver.c, in which
the return value was being stored to a variable which, in turn, was not
used.

Chris -)-----
(This used to be commit 384122d165)
1998-06-23 08:15:05 +00:00
Christopher R. Hertel
d4366df039 I've replaced the linked list used to manage the subnet namelists with a
splay tree.  For short lists, this will have no noticable effect.  As
lists (eg. the WINS database) grow longer, the speed improvements should
be quite dramatic.  This change is an incremental step toward replacing
the in-memory namelists with a back-end database.

This change is going into the 1.9.19pre-alpha code because...well...it's
pre-alpha.  Please let me know if there are any problems.

(Oh, as a side-effect, the wins.dat will be in sorted order.  :)

Chris -)-----
(This used to be commit 7806c453df)
1998-06-10 19:51:58 +00:00
Jeremy Allison
75e909f27d Fixed compile problem after make proto.
Chris's reformating of the (rather long named function) find_name_for_remote_broadcast_subnet
(moving the function name onto a line on it's own) caused the proto
awk script to miss it.
Jeremy.
(This used to be commit 17c758687f)
1998-06-09 02:17:06 +00:00
Christopher R. Hertel
96bc404277 This is a first step toward moving long namelists into a database. I
split the name_record structure into pieces.  The goal is that the key
(the name) be separate from the data associated with the key.  Databases
such as gdbm store information in [key,content] pairs.

There is no functional change in with this update.  It's just a step in
the direction that Jeremy and I have been discussing.

Chris -)-----
(This used to be commit e420a4bd7d)
1998-06-09 01:56:18 +00:00
Jeremy Allison
0725049859 Added code to add the Samba names onto the remote_broadcast subnet,
as NT 4.x does directed broadcast node status requests for the *<0x0> name.
Jeremy.
(This used to be commit 8c6fe8870a)
1998-06-08 19:09:47 +00:00
Christopher R. Hertel
f3e2663645 Cosmetic. Added a cast to (void) to a call to add_name_to_subnet() since
the return value was being ignored anyway.  SGI's lint said:

function returns value which is sometimes ignored
    add_name_to_subnet

Chris -)-----
(This used to be commit ae706bff10)
1998-06-08 03:44:13 +00:00
Jeremy Allison
d9e4b23674 Forgot to add the initialize_password_db() call to nmbd also.
Jeremy.
(This used to be commit 2f9f0a88e8)
1998-05-19 04:45:40 +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
Jeremy Allison
ee9a61841a includes.h: SunOS doesn't have strcasecmp, solaris versions prior to 2.6 don't
have vsnprintf.
locking_slow.c: slight tidy.
make_smbcodepage.c: Use safe_strcpy instead of pstrcpy.
nmbd_winsserver.c: Use pstrcpy instead of fstrcpy.
smbmount.c: Fixed reported bug.
util.c: Removed old fstrcpy/fstrcat functions.
Jeremy.
(This used to be commit f257d2e4ba)
1998-05-12 22:11:24 +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
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
Luke Leighton
d8d9f77233 created "passdb.c" which is an interface point to (at present) either
smbpasswd or ldap passwd, at compile-time (-DUSE_LDAP).

_none_ of the functions in ldap.c or smbpass.c should be called directly:
only those in passdb.c should be used.

-DUSE_LDAP is unlikely to compile at the moment.
(This used to be commit 57b01ad4ff)
1998-05-07 18:19:05 +00:00
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
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
ec6fde99ab Fixed bug that John found in WINS server code. When nmbd as a WINS
server is sending out a name_query after a WACK, it needs to send
a packet with recursion_desired = 0 (yes Luke, you were right all
along :-). If it doesn't then if it's talking to itself then the
query packet ends up back in the WINS server instead of in the client
side code.
Makefile: Changed proto generation to stop including NMBDOBJ twice.
nmbd_namequery.c nmbd_packets.c nmbd_winsserver.c: Added extra
query_name_from_wins_server() code.

Jeremy.
(This used to be commit c5ca05c295)
1998-04-20 20:32:50 +00:00
Jeremy Allison
041a292c43 ipc.c: Fix for printer queue spinning with Win95.
nmbd.c: Fix for always overwriting log despite append setting.
smb.h: Addition of last time password changed entry to account info.
smbpass.c: Changes to support last time changed field in smbpasswd file.
smbpasswd.c: Changes to support last time changed field in smbpasswd file.
util.c: Fix for always overwriting log despite append setting.
Jeremy.
(This used to be commit eb4fe9ecdf)
1998-04-15 20:00:41 +00:00
Jeremy Allison
2a53d6f707 Modified interfaces to getting smb password entries from
get_smbpwd_entry (now an internal function to smbpass.c)
to a more UNIX-like :

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

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

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

Other files changed are to match the above changes.

Jeremy.
(This used to be commit 1161cfb7f2)
1998-04-14 00:41:59 +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
fd6dacbcdb We were missing a case switch in announcement processing - we
were loggin a become backup request with debug log level of 0
- thus producing lots of annoying error messages.

Now handle this explicitly.
Jeremy.
(This used to be commit 0f4914b870)
1998-04-02 19:12:11 +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
c063e9ec3e added the ability to start/stop the server from SWAT.
I needed to modify the way the pidfile is handled in nmbd and smbd to
do this. Jeremy, you may wish to look at what I've done as it probably
breaks the Whistle use of pidfiles. In particular I've removed the -f
option and instead smbd and nmbd always create a pidfile in the lock
directory.
(This used to be commit 20bb22d61b)
1998-03-14 12:57:58 +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
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
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
45dab9f065 Makefile, password.c, includes.h: Added KRB4 patches from Johan Hedin <johanh@fusion.kth.se>
nmbd_packets.c: Patch for aliased interfaces from Daniel Haun <dhaun@ecf2.puc.edu>.
Jeremy.
(This used to be commit 60f6302b19)
1998-02-26 22:58:21 +00:00
Jeremy Allison
64095b2486 Code to work around a bug in FTP OnNet software NBT implementation.
They do a broadcast name release for WORKGROUP<0> and WORKGROUP<1e>
names and *don't set the group bit*.

Jeremy.
(This used to be commit 1feb54e1ba)
1998-02-26 19:26:18 +00:00
Jeremy Allison
4680e65bb5 Fixed bug reported by Janne.Harju@nmp.nokia.com. When used in broadcast
only mode nmbd was not reporting WORKGROUP<0> and WORKGROUP<1e> names
to a unicast node status query (although it was registering these names
on the network). Also tidied up code in nmbd_mynames.c so that all
known IP addresses are registered in the unicast subnet in this case
rather than just the first, as was previously done.
Jeremy.
(This used to be commit eb71c5edcb)
1998-02-24 20:05:39 +00:00
Jeremy Allison
cadfca4cf5 Fixed bug where second response message was being printed with the
wrong IP address. This confused a lot of people (including me :-).
Jeremy.
(This used to be commit 0f4080d3f0)
1998-02-24 18:46:47 +00:00
Jeremy Allison
834ef56244 nmbd_incomingdgrams.c: Fix for typo.
nmbd_sendannounce.c: Remote announcement was announcing to the wrong name !
nmblookup.c: Fix for substitutions not seeing hostname.
testparm.c: Fix for substitutions not seeing hostname.
wsmbstatus.c: Fix for substitutions not seeing hostname.
util.c: Change read_udp_socket to use sockaddr_in rather than dubiously
messing around with an opaque data type (sockaddr).
Jeremy.
(This used to be commit 776ccf5c06)
1998-02-24 17:59:34 +00:00
Jeremy Allison
c16d4aec00 nmbd_packets.c: nmbd_subnetdb.c: Patch from Andrey Alekseyev <fetch@muffin.arcadia.spb.ru>
to fix the fact that retransmit_or_expire_response_records() wasn't looking
at the WINS subnet.
server.c: Patch from jkf@soton.ac.uk to add %p (NIS server path) substitution.
smbpass.c: Fix to stop parsing failing on non-valid lines.
trans2.c: Fix for volume serial number code.
util.c:  Patch from jkf@soton.ac.uk to add %p (NIS server path) substitution.
         Fix for warnings under RH5. gcc 2.8.
Jeremy.
(This used to be commit e58ab3bbe6)
1998-02-20 19:48:01 +00:00
Andrew Tridgell
c04291ae99 make the initial logfile names consistent. This should mean that smbd
starts with log.smb and nmbd starts with log.nmb. It also gets rid of
the "log." when using the log.%m construct as %m expands to smb before
a client connects.
(This used to be commit b7712a0a6d)
1998-02-12 14:57:55 +00:00
Jeremy Allison
89652787c3 Makefile: Fix for OSF1 typo.
asyncdns.c: Fixes that went into 1.9.18p2 - allow unclocking of sigterm.
chgpasswd.c: char -> unsigned char fixes.
includes.h: AIX fix to get prototype for inet_ntoa.
local.h: Tune size of shared memory based on MAX_OPEN_FILES.
nmbd_mynames.c: Fix for nmbd repeated refresh bug.
nmbd_responserecordsdb.c: Fix for nmbd repeated refresh bug.
nmbd_winsserver.c: Fix for multi-homed registration optimisation.
smb.h: Moved default shared memory size to local.h
Jeremy.
(This used to be commit fa54668056)
1998-01-29 08:25:46 +00:00
Jeremy Allison
66c668a6d3 nmbd.c, server.c: Added #ifndef MEM_MAN around code that sets the SIGUSR1
and SIGUSR2 signals. This allows the MEM_MAN code to be compiled in and
the memory debug feature to be used with SIGUSR1.
Jeremy.
(This used to be commit 43ef7e3cb5)
1998-01-23 05:22:19 +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
2d1ff641f0 Fixed send_mailslot code where src_type was always being set to zero.
Fix found by Bernhard Laeser <nlaesb@ascom.ch>.
Jeremy.
(This used to be commit 303b5a79c8)
1998-01-21 12:15:07 +00:00
Jeremy Allison
c247cc7187 Fixed bug found by Bernhard Laeser where we are announcing to the wrong
DMB name.
Jeremy.
(This used to be commit 6b3d4620c1)
1998-01-20 04:58:41 +00:00
Jeremy Allison
0d1933fefc docs/Support.txt: Removed consultant.
source/Makefile: Added Volker's comment.
source/nmbd_become_lmb.c:
source/nmbd_browsesync.c:
source/nmbd_incomingdgrams.c: Fixed userdata alignment problems.
source/mem_man/mem_man.c:
source/mem_man/mem_man.h: added smb_ prefix to stop namespace collisions.
Jeremy.
(This used to be commit 4c8af3bc9f)
1998-01-09 05:33:27 +00:00
Jeremy Allison
c23ed625b2 includes.h: Added FreeBSD 3.x fixes. Added HPUX10.x fixes.
interface.c: Added netmask fix.
nmbd_nameregister.c: Fixed unitialised variable warnings.
nmbd_winsproxy.c: Fixed unitialised variable warnings.
nmbd_winsserver.c: Fixed DEC warnings.
print_svid.c: Fixed DEC warnings.
printing.c: Added LPRng fixes.
Jeremy.
(This used to be commit 28aff043c4)
1998-01-07 06:21:56 +00:00
Herb Lewis
d018d7b42a added timestrings to become and unbecome domain/local master browser
messages.
(This used to be commit 5e7e3d18b5)
1998-01-03 03:35:13 +00:00
Andrew Tridgell
b26a147f04 fixed another couple of minor type errors (they could cause incorrect
output but not a core dump)
(This used to be commit 4dc66214a0)
1997-12-26 10:07:05 +00:00
Andrew Tridgell
ed2ed5671b fixed a couple of illegal uses of scanf() in the nmbd wins code. They
caused a core dump under IRIX when compiled with -64.
In general you cannot assume things about variable sizes. In
particular sizeof(time_t) may not equal sizeof(long) and
sizeof(uint16) may not equal sizeof(short).
There are probably other bugs like this. We'll need to check all
format statements for use of %ld, %hx etc. In general these should not
be used unless you have an explicit cast to the appropriate type.
(This used to be commit 6ea907e786)
1997-12-26 10:01:57 +00:00
Andrew Tridgell
65a21bcbdd use _exit to exit a child
(This used to be commit 992b1cbc14)
1997-12-26 09:57:40 +00:00
Herb Lewis
7f49012b1d This is actually Jeremy, working as Herb :-).
Fixed bug where, when server is shut down it would always
do a lm announce broadcast of shutdown. This could cause other
nmbd's to think that they have seen an lm announce broadcast and
start doing it themselves.
Changed to only send lm announce shutdown if admin configured it
or one was seen on the subnet.
Jeremy.
(This used to be commit 64c8111574)
1997-12-24 15:42:14 +00:00
Jeremy Allison
aef2c5d699 Added SIGUSR1/SIGUSR2 handling.
Sending nmbd/smbd a SIGUSR1 will raise the debug level by one (capped at 10)
sending a SIGUSR2 will lower it (lower limit at zero).
Jeremy.
(This used to be commit 6a3cb6f4b4)
1997-12-24 09:30:56 +00:00
Jeremy Allison
5cdb60bd93 nmbd_elections.c: Added new parameter to dump_workgroups call.
nmbd_incomingdgrams.c: Deal with announcements with servertype == 0 - these
 are announcements that a machine is shutting down and must be treated differently.
nmbd_serverlistdb.c: Exposed remove_server_from_workgroup as external.
  Added code to dump out workgroups on signal correctly.
nmbd_workgroupdb.c: Added new parameter to dump_workgroups call.
Jeremy.
(This used to be commit f7591109b9)
1997-12-24 08:49:44 +00:00
Jeremy Allison
0c0777400f Finally added the code Andrew wanted that will allow a Samba domain
master browser to use the *<1b> feature of the Samba WINS server to
get a full workgroup list.
nmbd.c: Added timed call to collect_all_workgroup_names_from_wins_server().
nmbd_browsesync.c: Meat of the code to implement collect_all_workgroup_names_from_wins_server().
nmbd_incomingdgrams.c: Fixed comment typo.
Jeremy.
(This used to be commit 1a3ab3e84a)
1997-12-24 07:10:04 +00:00
Jeremy Allison
74c807fcc5 architecture.doc: Re-added since I lost it (sorry Dan :-).
nmbd.c nmbd_responserecordsdb.c: Spelling mistake fixes.
Jeremy.
(This used to be commit f5dfc8913b)
1997-12-23 06:38:36 +00:00
Jeremy Allison
b80b6ea3b4 kanji.h: Fixed problems with re-definitions of strchr and others on AIX.
nmbd_nameregister.c: Applied fix found by "Eloy A. Paris" <eparis@ven.ra.rockwell.com>
(don't re-use lists after you have freed them :-).
Jeremy.
(This used to be commit bcfcc39a27)
1997-12-18 11:05:00 +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
5d4345b66d nmbd_incomingdgrams.c: Fix bug with Syntax 5.1 servers reported by SGI where
they do host announcements to LOCAL_MASTER_BROWSER_NAME<00> rather than
WORKGROUP<1d>.
nmbd_incomingrequests.c: Deal with WINS_PROXY_NAME issues - don't reply
with that name if it's the same broadcast net.
nmbd_serverlistdb.c: Stopped writing "Unknown" for local master browsers
we don't know.
nmbd_winsproxy.c: Deal with WINS_PROXY_NAME issues - don't reply
with that name if it's the same broadcast net.
Jeremy.
(This used to be commit 5adfff94c9)
1997-12-16 07:30:25 +00:00
Andrew Tridgell
111245cd73 allow name_type 0x20 as well as name_type 0x0 in dns proxying
(This used to be commit be8a40487c)
1997-12-14 17:49:41 +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
00fc025b93 catch signals in the async dns daemon and allow it to auto-restart if
necessary
(This used to be commit fa599067f0)
1997-12-04 10:58:40 +00:00
Andrew Tridgell
bb97a6adac allow for zero size reads in asyncdns. These can happen after a signal
(This used to be commit 8bac91a6e7)
1997-12-04 08:10:49 +00:00
Jeremy Allison
c4aaa6bc3f asyncdns.c: Removed warning when compiling with -DSYNC_DNS.
nameelect.c: Tidied up settings of work->ServerType when unbecoming things.
nmbd.c: Fixed pidFile warning.
server.c: Fixed pidFile warning.
Jeremy.
(This used to be commit 94d53dcac5)
1997-12-02 19:00:18 +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
Andrew Tridgell
5c3f9f4e2c auto-create the locks directory on startup
(This used to be commit a0ab8fe54c)
1997-11-11 00:48:42 +00:00
Andrew Tridgell
d186100b66 fix comments
(This used to be commit b3fd976b6c)
1997-11-02 01:33:28 +00:00
Andrew Tridgell
4fe3b2ce75 to avoid any possibility of the pipe getting full and blocking we now
only allow one query in the async dns pipe at a time. The others are
queued in the parent.
(This used to be commit f1004dd52a)
1997-11-02 01:25:50 +00:00
Andrew Tridgell
87cada5fd3 minor async DNS cleanups
- start it earlier
- set DEBUGLEVEL to -1 to prevent any debug calls in child
- exit with _exit() to prevent logfile corruption
(This used to be commit 21dd073a20)
1997-11-01 23:42:28 +00:00
Jeremy Allison
abb255cfe6 Big change to make nmbd code more readable/understandable.
Main change is removal of find_name_search() confusion.
This has been replaced with find_name_on_subnet() which
makes it explicit what is being searched.

Also changed wins_subnet to be wins_client_subnet in
preparation for splitting the wins subnet into client
and server pieces.

This is a big nmbd change and I'd appreciate any
bug reports.

Specific changes follow :

asyncdns.c:
     Removed wins entry from add_netbios_entry(). This is now
     explicit in the subnet_record parameter.

interface.c:
     iface_bcast(), iface_nmask(), iface_ip() return the
     default interface if none can be found. Made this
     behavior explicit - some code in nmbd incorrectly
     depended upon this (reply_name_status() for instance).

nameannounce.c:
     find_name_search changes to find_name_on_subnet.

namebrowse.c:
     wins_subnet renamed to wins_client_subnet.

namedbname.c:
     find_name_search removed. find_name_on_subnet added.
     add_netbios_entry - wins parameter removed.

namedbsubnet.c:
     find_req_subnet removed - not explicit enough.

nameelect.c:
     wins_subnet renamed to wins_client_subnet.

namepacket.c:
     listening() simplified.

nameresp.c:
     wins_subnet renamed to wins_client_subnet.

nameserv.c:
     find_name_search moved to find_name_on_subnet.

nameserv.h:
     FIND_XXX  -> changed to FIND_SELF_NAME, FIND_ANY_NAME.

nameservreply.c:
     find_name_search moved to find_name_on_subnet.
     Debug entries changed.

nameservresp.c:
     wins_subnet renamed to wins_client_subnet.

namework.c:
     wins_subnet renamed to wins_client_subnet.

nmbd.c:
     wins parameter removed from add_netbios_entry.

nmbsync:
     wins_subnet renamed to wins_client_subnet.

proto.h: The usual.

server.c:
     remove accepted fd from fd_set.

Jeremy (jallison@whistle.com)
(This used to be commit 2c97b33fc0)
1997-10-23 22:30:57 +00:00
Andrew Tridgell
e5c319186d Implemented asynchronous DNS lookups in nmbd.
I realised this afternoon just how easy it is to add this, so I
thought I'd implement it while the idea was fresh.

nmbd forks at startup and uses a pipe to talk to its child. The child
does the DNS lookups and the file descriptor of the child is added to
the main select loop.

While I was doing this I discovered a bug in nmbd that explains why
the dns proxy option has been so expensive. The DNS cache entries in
the WINS list were never being checked, which means we always did a
DNS lookup even if we have done it before and it is in cache. I'm sure
this used to work (I tested the DNS cache when I added it) so someone
broke it :-(

Anyway, the async DNS gets rid of the problem completely. I'll commit
just the fix to the DNS cache bug to the 1.9.17 tree.

You can disable async DNS by adding -DSYNC_DNS to the compile flags.
(This used to be commit 178e27de07)
1997-10-22 11:02:00 +00:00
Jeremy Allison
c336a2f081 .cvsignore: Added make_smbcodepage
interface.c: Added is_local_net().
locking.c: Added Fix for zero length share files from Gerald Werner <wernerg@mfldclin.edu>
           plus a race condition fix for the fix.
nameannounce.c: Made function static.
namedbresp.c: extern int ClientDGRAM removed - not used.
namedbserver.c: extern int ClientDGRAM removed - not used.
namedbsubnet.c: Added code to make sockets per subnet.
namepacket.c: Added code to read from all sockets & filter.
nameresp.c: extern int ClientDGRAM removed - not used.
nameserv.c: Indentation tidyup :-).
nameserv.h: Added sockets to struct subnet.
nameservresp.c: Improved debug message.
nmbd.c: Changed to terminte on listen_for_packets exiting.
nmbsync.c: extern int ClientDGRAM & ClientNMB removed - not used.
proto.h: The usual.
util.c: Fixed debug message.
Jeremy (jallison@whistle.com)
(This used to be commit 6904c2de08)
1997-10-17 23:08:07 +00:00
Andrew Tridgell
4fe23997bf added -a "append log" option
(This used to be commit 4b7d51ffb8)
1997-10-17 01:46:16 +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
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
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
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
d98bea900e namepacket.c: Block SIGTERM correctly - we can only take them at defined points.
nameserv.c:		Fixup name release code - used when we are going down.
nameservreply.c:	Relaxed check for deleting name - original code never deleted.
nmbd.c:			Block SIGTERM signals most of the time - see comment on namepacket above.
Jeremy (jallison@whistle.com)
(This used to be commit 9f4e012247)
1997-05-31 01:11:40 +00:00