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

94 Commits

Author SHA1 Message Date
Luke Leighton
57b01ad4ff 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
567d3f8389 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
866406bfe3 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
c5ca05c295 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
eb4fe9ecdf 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
1161cfb7f2 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
cd2613c572 Changes to allow Samba to be compiled with -Wstrict-prototypes
with gcc. (Not a big change although it looks like it :-).

Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
0f4914b870 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
7f118970da 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.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
20bb22d61b 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.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
f9af35da26 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
0001-01-01 00:00:00 +00:00
Jeremy Allison
118ba4d77a "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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
299016338c 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
60f6302b19 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
1feb54e1ba 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
eb71c5edcb 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
0f4080d3f0 Fixed bug where second response message was being printed with the
wrong IP address. This confused a lot of people (including me :-).
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
776ccf5c06 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
e58ab3bbe6 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.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
b7712a0a6d 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
fa54668056 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
43ef7e3cb5 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
b9c1697723 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
303b5a79c8 Fixed send_mailslot code where src_type was always being set to zero.
Fix found by Bernhard Laeser <nlaesb@ascom.ch>.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
6b3d4620c1 Fixed bug found by Bernhard Laeser where we are announcing to the wrong
DMB name.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
4c8af3bc9f 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
28aff043c4 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.
0001-01-01 00:00:00 +00:00
Herb Lewis
5e7e3d18b5 added timestrings to become and unbecome domain/local master browser
messages.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
4dc66214a0 fixed another couple of minor type errors (they could cause incorrect
output but not a core dump)
0001-01-01 00:00:00 +00:00
Andrew Tridgell
6ea907e786 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.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
992b1cbc14 use _exit to exit a child 0001-01-01 00:00:00 +00:00
Herb Lewis
64c8111574 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
6a3cb6f4b4 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
f7591109b9 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
1a3ab3e84a 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
f5dfc8913b architecture.doc: Re-added since I lost it (sorry Dan :-).
nmbd.c nmbd_responserecordsdb.c: Spelling mistake fixes.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
bcfcc39a27 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
5136c5ec11 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
3605da0557 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
5adfff94c9 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.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
be8a40487c allow name_type 0x20 as well as name_type 0x0 in dns proxying 0001-01-01 00:00:00 +00:00
Jeremy Allison
d80b0cb645 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.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
fa599067f0 catch signals in the async dns daemon and allow it to auto-restart if
necessary
0001-01-01 00:00:00 +00:00
Andrew Tridgell
8bac91a6e7 allow for zero size reads in asyncdns. These can happen after a signal 0001-01-01 00:00:00 +00:00
Jeremy Allison
94d53dcac5 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.
0001-01-01 00:00:00 +00:00
John Terpstra
2ee25cd117 Added in mods for new smb.conf "remote browse sync" option as posted to
the samba-1.9.17 tree moments ago.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
a0ab8fe54c auto-create the locks directory on startup 0001-01-01 00:00:00 +00:00
Andrew Tridgell
b3fd976b6c fix comments 0001-01-01 00:00:00 +00:00
Andrew Tridgell
f1004dd52a 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.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
21dd073a20 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
0001-01-01 00:00:00 +00:00