1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-04 05:18:06 +03:00
Commit Graph

417 Commits

Author SHA1 Message Date
Jelmer Vernooij
11db21cc1c Use the new modules system in VFS. If a module can't be loaded with the
new modules system, we still fall back to the old system.
(This used to be commit cebe8d8b42)
2003-03-27 12:08:46 +00:00
Jelmer Vernooij
66c321232a Don't use old usage() function, but the one from popt.
Remove some useless arguments
(This used to be commit 8df30059ef)
2003-03-24 14:32:11 +00:00
Jelmer Vernooij
41a09c3c53 Revoke some of the popt patch from metze I applied earlier today. It added
some double options and broke some parameters.
(This used to be commit d5f9b0275c)
2003-03-24 14:15:14 +00:00
Jelmer Vernooij
11e9de855c Patch from metze to generalise POPT_COMMON_SAMBA, with some minor changes
(This used to be commit 2ddfed298d)
2003-03-24 11:25:34 +00:00
Jelmer Vernooij
89cd467415 Add nicer --help headers
(This used to be commit e56ab71f12)
2003-03-22 23:50:11 +00:00
Jelmer Vernooij
47ea3a2bf2 Put in the new modules system. It's now used by passdb and rpc. I will
put a doc about it in dev-doc later today.
(This used to be commit af7bfee0c6)
2003-03-19 18:45:19 +00:00
Andrew Bartlett
01289b14a7 Make sure that the 'remote' machine name can only be set once. For some weird
reason, during a Win2003 installation, when you select 'domain join' it sends
one machine name in the name exchange, and litraly 'machinename' during the
NTLMSSP login.

Also fix up winbindd's logfile handling, so that it matches smbd and nmbd.

(This helps me, by seperating the logs by pid).

Andrew Bartlett
(This used to be commit afe5a3832f)
2003-03-08 10:22:50 +00:00
Andrew Tridgell
9043696121 i forgot to commit the privilege db init call
(This used to be commit e8ec2b1180)
2003-03-01 10:47:38 +00:00
Jelmer Vernooij
d21b15ff57 - Rename 'modules = ' to 'preload modules = '
- Add smb_probe_module()
- Add init_modules()
- Call these functions
(This used to be commit f8f2165322)
2003-02-27 01:54:41 +00:00
Jeremy Allison
15fda89ab6 Check for too many processes *before* the fork.
Jeremy.
(This used to be commit dfb596b012)
2003-02-05 21:17:12 +00:00
Jeremy Allison
b102e79e75 Add 3 second timeout when terminating server and sending print notify
messages. Stops build-up of large numbers of smbd's waiting to terminate
on large print throughput.
Jeremy.
(This used to be commit 4ae130bfa8)
2003-01-30 23:55:13 +00:00
Gerald Carter
05edd278c2 make -i flag work lik eit did in 2.2
(This used to be commit 54b054c1ed)
2003-01-14 15:52:45 +00:00
Tim Potter
642fad95ef Moved smbd process counting functions from smbd/server.c to smbd/process.c
so that bin/vfstest can link.
(This used to be commit 812ce0368c)
2003-01-09 05:49:51 +00:00
Jeremy Allison
65195b4d54 Ensure we don't get an invalid number for total smbd's if the tdb update
fails.
Jeremy.
(This used to be commit 99e69fd74d)
2003-01-08 21:42:43 +00:00
Gerald Carter
df4af79c78 patch to include support for daemontools from Michael Handler
(This used to be commit 4c48c475a2)
2003-01-03 17:32:11 +00:00
Andrew Bartlett
6d66fb308a BIG patch...
This patch makes Samba compile cleanly with -Wwrite-strings.
 - That is, all string literals are marked as 'const'.  These strings are
always read only, this just marks them as such for passing to other functions.

What is most supprising is that I didn't need to change more than a few lines of code (all
in 'net', which got a small cleanup of net.h and extern variables).  The rest
is just adding a lot of 'const'.

As far as I can tell, I have not added any new warnings - apart from making all
of tdbutil.c's function const (so they warn for adding that const string to
struct).

Andrew Bartlett
(This used to be commit 92a777d0ea)
2003-01-02 09:07:17 +00:00
Jeremy Allison
7f23546730 Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
(This used to be commit 842e08e52a)
2002-12-20 20:23:06 +00:00
Andrew Bartlett
65643516d7 Having waited for *way* too long, this is mimir's namecache and trusted domain
cache code.

This uses gencache, mimir's new caching code that stores at text-based cache
of various data.

Mimir has done a *lot* of work on this patch, and it is finally time to
get it in CVS.

Andrew Bartlett
(This used to be commit 47f3bfe956)
2002-11-26 11:57:30 +00:00
Jelmer Vernooij
ba7056a842 Load modules in lp_modules() after fork()
(This used to be commit 77afa4f167)
2002-11-13 19:04:17 +00:00
Jeremy Allison
250c980119 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
(This used to be commit 82b8f749a3)
2002-11-12 23:15:52 +00:00
Andrew Bartlett
c501ac2bfa Compleatly remove support for logfile truncation. All logs are opened for
append writes.

(blessed by jra)

Andrew Bartlett
(This used to be commit 81633064dd)
2002-11-08 23:05:34 +00:00
Jelmer Vernooij
4d70634685 Make append_log work again
(This used to be commit 2fd496b49f)
2002-11-07 21:39:51 +00:00
Jelmer Vernooij
5883bc73c1 Handle -p correctly
(This used to be commit b69d5fffd9)
2002-11-04 14:50:08 +00:00
Jelmer Vernooij
7da7b4a464 Make IRIX happy
(This used to be commit aeb94bb0d7)
2002-11-04 14:08:11 +00:00
Jelmer Vernooij
670764e38c Remove obsolete function usage and some unused variables
(This used to be commit 162431a88c)
2002-11-02 18:58:55 +00:00
Jelmer Vernooij
25e9b03738 Convert to popt.
Removed -o and -a options - these have been broken since 2.2 without complaints from users
(This used to be commit c8589a567b)
2002-11-02 16:36:39 +00:00
Jeremy Allison
5593892caf Fix slowdown because of enumerating all print queues on every smbd startup.
Jeremy.
(This used to be commit d05b147fb3)
2002-10-31 23:41:02 +00:00
Tim Potter
36cab08d37 Send any queued up print notify messages in exit_server() so they
don't get lost if the client exits before timeout_processing()
has a chance to run.
(This used to be commit d7dde74aae)
2002-09-05 04:33:07 +00:00
Jeremy Allison
a1aafce4dc Add bcast_msg_flags to connection struct. Allows sender to filter when
sending broadcast messages. Also initial cut-down of printing notify
messages (not yet finished).
Jeremy.
(This used to be commit aca3337196)
2002-09-04 19:13:06 +00:00
Herb Lewis
e6de7c24a5 move where got_sig_term and reload_after_sighup are defined.
populate cli structure with called name and calling name even for port
445 connects.
(This used to be commit 123eee6206)
2002-08-22 23:34:27 +00:00
Andrew Bartlett
22404245b4 Becouse of changes to the meaning of this feild over time, this doesn't
actually work.  Also, the idea of 'loopback winbind' isn't that bad an idea
anyway (potential PDC/BDC applications).

Given all that, remove it...

Andrew Bartlett
(This used to be commit fc0d6e53fc)
2002-08-17 05:26:58 +00:00
Tim Potter
88d321becd Merge of netbios namecache code from APPLIANCE_HEAD.
Tridge suggested a generic caching mechanism for Samba to avoid the
proliferation of little cache files hanging around limpet like in the
locks directory.  Someone should probably implement this at some
stage.
(This used to be commit dad31483b3)
2002-08-16 00:25:48 +00:00
Andrew Bartlett
6ddba1e99b Fix the %m security bug again - and try to make it harder to reintroduce in
future.

This moves us from fstrcpy() and global variables to 'get' and 'set' functions.

In particular, the 'set' function sainity-checks the input, in the same way as
we always have.

Andrew Bartlett
(This used to be commit e57a896f06)
2002-08-10 23:20:04 +00:00
Andrew Tridgell
ab9ff0fa73 This fixes a number of ADS problems, particularly with netbiosless
setups.

- split up the ads structure into logical pieces. This makes it much
  easier to keep things like the authentication realm and the server
  realm separate (they can be different).

- allow ads callers to specify that no sasl bind should be performed
(used by "net ads info" for example)

- fix an error with handing ADS_ERROR_SYSTEM() when errno is 0

- completely rewrote the code for finding the LDAP server. Now try DNS
  methods first, and try all DNS servers returned from the SRV DNS
  query, sorted by closeness to our interfaces (using the same sort code
  as we use in replies from WINS servers). This allows us to cope with
  ADS DCs that are down, and ensures we don't pick one that is on the
  other side of the country unless absolutely necessary.

- recognise dnsRecords as binary when displaying them

- cope with the realm not being configured in smb.conf (work it out
  from the LDAP server)

- look at the trustDirection when looking up trusted domains and don't
  include trusts that trust our domains but we don't trust
  theirs.

- use LDAP to query the alternate (netbios) name for a realm, and make
  sure that both and long and short forms of the name are accepted by
  winbindd. Use the short form by default for listing users/groups.

- rescan the list of trusted domains every 5 minutes in case new trust
  relationships are added while winbindd is running

- include transient trust relationships (ie. C trusts B, B trusts A,
  so C trusts A) in winbindd.

- don't do a gratuituous node status lookup when finding an ADS DC (we
  don't need it and it could fail)

- remove unused sid_to_distinguished_name function

- make sure we find the allternate name of our primary domain when
  operating with a netbiosless ADS DC (using LDAP to do the lookup)

- fixed the rpc trusted domain enumeration to support up to approx
  2000 trusted domains (the old limit was 3)

- use the IP for the remote_machine (%m) macro when the client doesn't
  supply us with a name via a netbios session request (eg. port 445)

- if the client uses SPNEGO then use the machine name from the SPNEGO
  auth packet for remote_machine (%m) macro

- add new 'net ads workgroup' command to find the netbios workgroup
  name for a realm
(This used to be commit e358d7b24c)
2002-08-05 02:47:46 +00:00
Andrew Tridgell
4516a14dbb added support for smbd listening on port 445 and 139. It now listens
on both by default, and you can specify a list of ports to listen on
either with "smb ports = " in smb.conf or using the -p option to smbd.

this is needed for proper netbiosless operation.
(This used to be commit 5dee0a7b5e)
2002-07-31 04:56:16 +00:00
Andrew Bartlett
f65440ff52 Move some startup time initialisation to server.c, so it is all in one place.
I'm not sure that we need that "dummy" talloc init, but anyway...

Also, add some 'const' to the table of smb reply functions.

Andrew Bartlett
(This used to be commit 790b7c9ab8)
2002-07-20 08:44:34 +00:00
Andrew Bartlett
714abda3e7 Add support for duplicating stderr into our logfiles.
This is for two things:  To allow panic actions etc to pump out backtraces to
stderr and to allow vangrind to put its stuff in a logfile - making it possible
to debug smbd when launched from inetd.

I've also cleaned up some of the duplicate names in procedures between smbd and
nmbd.

Andrew Bartlett
(This used to be commit 4bcb327319)
2002-07-20 07:02:45 +00:00
Jeremy Allison
29426b4a50 Gone back to explicit queue number passing as snum - removed encoding of
queueid in job number. This means we must have an internal tdb to store
mapping from 16 bit RAP jobid's to 32 bit RPC jobids.
Jeremy.
(This used to be commit 4ff64f6970)
2002-07-17 19:12:17 +00:00
Jeremy Allison
25148a148c *Experimental* new large-scaling printer code. Splits printing.tdb into
a separate tdb per printer, but only keeps (currently one) tdb open at
a time (although this is easily changed by changing a #define). Needs
scalability testing with large numbers of printers now....
Jeremy.
(This used to be commit b0909cfa14)
2002-07-11 00:06:29 +00:00
Gerald Carter
a3c3960edc first cut at implementing support for browsing printer and driver driver
via regedt32.exe.  The regsitry.tdb is only a framework.  It is not
intended to store values, only key/subkey structure.  The data
will be retrieved from nt*tdb (for printers) creating a virtual view
of the data.

You can currently connect to a Samba box using regedt32.exe (haven't
tried regedit.exe).  Some basic keys are created in registry.tdb
for use.

There are two problems....

  * something is getting freed in the winreg code that causes heap
    corruption later on.  As long as you don't play with the winreg
    server functionality, I don't think you'll be bitten by this.

  * no access controls are currently implemented

  * I can't browse HKLM because regedt32 greys out the SYSTEM subkey.

ok so that was three....
(This used to be commit 542d3c93a9)
2002-07-03 19:15:26 +00:00
Jeremy Allison
e7a866dd3d Shut down printing tdb correctly - this will be more important when I go
to a tdb per-queue for scalability.
Jeremy.
(This used to be commit e808eb2758)
2002-06-28 23:11:31 +00:00
Gerald Carter
7b60e23040 compile warngin fixes merged from 2.2
(This used to be commit 29874f4b8f)
2002-06-17 15:33:13 +00:00
Andrew Bartlett
b0ffabdcca Globally replace 'global_sam_sid' with get_global_sam_sid(), a self
initialising function.  This patch thanks to the work of
"Stefan (metze) Metzmacher" <metze@metzemix.de>

This is partly to enable the transition to SIDs in the the passdb.

Andrew Bartlett
(This used to be commit 96afea638e)
2002-06-07 14:33:33 +00:00
Andrew Bartlett
daec6cbbee Cleanups!
Make some code static, add some const to the PAM code, and make the plaintext
password code actually function - particulary without the requirement to
modify the 'struct passwd' (which it assumed was made up of fstrings)

This kills some particularly ugly code in lib/util_pw.c

Andrew Bartlett
(This used to be commit 302dad4990)
2002-05-22 12:14:28 +00:00
Andrew Bartlett
eed5094264 This removes --with-ssl from Samba.
This option was badly maintained, useless and confused our users and
distirbutors.  (its SSL, therfore it must be good...)

No windows client uses this protocol without help from an SSL tunnel.

I can't see any reason why setting up a unix-side SSL wrapper would
be any more difficult than the > 10 config options this mess added
to samba in any case.

On the Samba client end, I think the LIBSMB_PROG hack should be
sufficient to start stunnel on the unix side.  We might extend this
to take %i and %p (IP and port) if there is demand.

Andrew Bartlett
(This used to be commit b04561d3fd)
2002-05-17 12:42:39 +00:00
Andrew Tridgell
9cd0306baa This split the mangling code up to allow for the possibility of multiple
mangling implementation, selectable using "mangling method = " in smb.conf

It also tidies the interface a little, although it is still nasty.
(This used to be commit be23d87a17)
2002-04-11 02:20:56 +00:00
Andrew Bartlett
c21ff8f762 Reintroduce the 2.2 name mangling code, until we get are more flexible solution.
Even for a hash/cache setup, this code needs some more work, in particular
it needs to use mangle_get_prefix() etc and to move to unicode internals.

Andrew Bartlett
(This used to be commit ad8aa47057)
2002-04-08 01:58:44 +00:00
Jean-François Micouleau
14f0beb21c added shutdown to smbd
J.F.
(This used to be commit 51a5bbfee7)
2002-03-29 14:28:38 +00:00
Jeremy Allison
840279f342 Now we have reliable signals take SIGTERM inband.
Jeremy.
(This used to be commit cad82926a8)
2002-03-14 02:15:08 +00:00
Jeremy Allison
095b903325 Added Herb's fix to override log level from command line.
Jeremy.
(This used to be commit 439839be99)
2002-03-05 21:37:50 +00:00