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

904 Commits

Author SHA1 Message Date
Michael Adam
39ec8791f8 s3: make better use of ccache by not including version.h in every C-file.
version.h changes rather frequently. Since it is included via includes.h,
this means each C file will be a cache miss. This applies to the following
situations:

* When building a new package with a new Samba version

* building in a git branch after calling mkversion.sh
  after a new commit (i.e. virtually always)

This patch improves the situation in the following way:

* remove inlude "version.h" from includes.h

* Use samba_version_string() instead of SAMBA_VERSION_STRING
  in files that use no other macro from version.h instead of
  SAMBA_VERSION_STRING.

* explicitly include "version.h" in those files that use more
  macros from "version.h" than just SAMBA_VERSION_STRING.

Michael
2009-01-15 22:56:01 +01:00
Jeremy Allison
f497a79f28 Deprecate the "share modes" parameter to address bug #6024, swat disagrees with smbstatus as to share mode with share modes = No set in samba.
Jeremy.
2009-01-12 16:25:03 -08:00
Steven Danneman
19a05bf2f4 Make STATEDIR and CACHEDIR configurable through ./configure and loadparm.c
If they are not explicitely set in either place both will default to LOCKDIR.

Signed-off-by: Michael Adam <obnox@samba.org>
2009-01-12 12:16:03 +01:00
Volker Lendecke
81624030ef Fix a typo found by the IBM Checker 2009-01-04 18:14:33 +01:00
Jelmer Vernooij
ef80d1b794 Fix use of "time offset" parameter, and add test to make sure I don't break it again :-) 2008-12-23 22:10:34 +01:00
root
cf9f2484b7 s3:loadparm/docs: Set default for "ldap ssl" to "start tls".
This has been discussed on samba-technical before.
3.3 and newer only!

Karolin
2008-12-21 08:55:30 +01:00
Karolin Seeger
cbb085b2a2 s3: loadparm: Clean-up list of parameters.
We don't need to list several combinations of lowercase and uppercase here.

Karolin
2008-12-21 08:23:39 +01:00
Karolin Seeger
9458d4be87 s3/loadparm.c: Change default value for "ldap ssl".
LDAP_SSL_ON is not defined at all. That's why the actual default value
was "" for a long time. Set a more sensible default value without chnging the
default behaviour.

-----8<------------------snip--------------8<--------------
user@host:/data/git/samba/v3-0-test/source> git grep LDAP_SSL_ON | cat
include/smb.h:enum ldap_ssl_types {LDAP_SSL_ON, LDAP_SSL_OFF,
LDAP_SSL_START_TLS};
param/loadparm.c:       Globals.ldap_ssl = LDAP_SSL_ON;
----->8------------------snap-------------->8--------------

It's the same in 3.2 and 3.3 series.

Karolin
2008-12-17 16:31:06 +01:00
Michael Adam
51118b1974 s3:loadparm: fix copy service error (canonicalize_servicename: NULL source name)
this was introduced by commit 3358a139d2.

Michael
2008-12-15 14:46:30 +01:00
Michael Adam
c2bd88f145 s3:loadparm: add service-struct based variants of the free-parameter routines
and use the abstracted free_one_parameter_common() in old
free_one_parameter_by_snum() as well as in new free_one_parameter()

Michael
2008-12-15 14:46:25 +01:00
Michael Adam
03f19dad79 s3:loadparm: rename free_parameters() to free_parameters_by_snum()
Michael
2008-12-15 14:46:19 +01:00
Michael Adam
0b0dc506d4 s3:loadparm: rename free_parameter() to free_one_parameter_by_snum()
Michael
2008-12-15 14:46:11 +01:00
Michael Adam
6244194265 s3:loadparm: add lp_local_ptr() that operates on a service struct
and use this in lp_local_ptr_by_snum().

Michael
2008-12-15 14:20:16 +01:00
Michael Adam
91c543f0b5 s3:loadparm: rename lp_local_ptr() to lp_local_ptr_by_snum()
Michael
2008-12-15 14:16:06 +01:00
Michael Adam
606abdceac s3:loadparm: fix newly introduced leading whitespaces to tabs
Michael
2008-12-15 13:33:24 +01:00
Todd Stecher
9985898e94 s3: Add support for access based share enumeration 2008-12-08 22:23:16 -08:00
Yasuma Takeda
611ef42053 Fix bug #5944 - nmbd does not boot if socket adress = "" is defined in smb.conf 2008-12-05 13:37:51 -08:00
Jeremy Allison
8962be69c7 Make us clean under valgrind --leak-check=full by using talloc_autofree_context() instead of NULL.
Remove the code in memcache that does a TALLOC_FREE on stored pointers. That's a disaster waiting
to happen. If you're storing talloc'ed pointers, you can't know their lifecycle and they should
be deleted when their parent context is deleted, so freeing them at some arbitrary point later
will be a double-free.
Jeremy.
2008-11-06 20:48:13 -08:00
Jeremy Allison
8b4b5c3a92 Add wrapper str_list_make_v3() to replace the old S3 behavior of
str_list_make(). From Dan Sledz <dan.sledz@isilon.com>:
In samba 3.2 passing NULL or an empty string returned NULL.
In master, it now returns a list of length 1 with the first string set
to NULL (an empty list).
Jeremy.
2008-11-06 18:53:00 -08:00
Jelmer Vernooij
ddcab787c4 Rename dos_errstr() to win_errstr() for consistency with Samba 4. 2008-11-01 17:19:26 +01:00
Jelmer Vernooij
9de80e7abc Samba3: Include util.h header file rather than having custom prototypes. 2008-11-01 03:14:43 +01:00
Jelmer Vernooij
89c9545430 Use str_list_equal() rather than str_list_compare(). 2008-10-18 15:56:07 +02:00
Jelmer Vernooij
2d89b52be8 Use separate make variables for libutil and libcrypto. 2008-10-18 14:28:40 +02:00
Jelmer Vernooij
1b99d8fbb5 Use common util_file code. 2008-10-12 17:34:43 +02:00
Jelmer Vernooij
348be5f1e4 Share data_blob implementation. 2008-10-12 01:46:15 +02:00
Jeremy Allison
eada8f8abe If you have a large number of cups printers, then scanning for print info can cause a client to timeout
(it takes longer than 30 seconds to enumerate them). Make scanning for printers async with a callback
from the main loop. This fixes a bug that was irritating *me* :-).
Jeremy.
2008-10-10 11:55:14 -07:00
Michael Adam
3358a139d2 [s3]loadparm: refactor freeing of parameter data out and reduce memleak.
Add new functions free_parameter(), free_parameters() and
free_global_parameters() and use these in the appropriate places,
reducing code duplication.

Also, always TALLOC_FREE data of type P_LIST, thus reducing mem-leaks:
This had not been done in init_globals before.

Michael
2008-09-27 22:28:27 +02:00
Michael Adam
e56c89b5e8 [s3]loadparm: in lp_do_parameter() use function lp_local_ptr()
instead of hard coded calculation.

Michael
2008-09-27 22:28:26 +02:00
Michael Adam
1578610aef [s3]loadparm: remove superfluous talloc context / talloc_stackframe call.
Michael
2008-09-27 22:28:26 +02:00
Michael Adam
aa388a2005 [s3]loadparm: refactor setting parametric options in list out
into new function set_param_opt().
This unifies and clarifies two instances of the code.

Michael
2008-09-27 22:28:26 +02:00
Michael Adam
33d18c76f1 [s3]loadparm: fix memory error - free the right param_opt->list in copy_service.
Michael
2008-09-27 22:28:26 +02:00
Michael Adam
612aa3915f [s3]loadparm: refactor freeing of parametric options into free_param_opts().
This code was there in three places.

Michael
2008-09-27 22:28:25 +02:00
Michael Adam
b38ed2674b [s3]loadparm: rename process_registry_service() to process_smbconf_service().
There is nothing registry-specific in that function.

Michael
2008-09-27 22:28:25 +02:00
Karolin Seeger
9cf1a68977 printing: Rename new parameter "cups timeout" to "cups connection timeout".
Karolin
2008-09-24 11:09:04 -07:00
Karolin Seeger
765e5d2282 printing: Add new parameter "cups timeout".
The default timeout for connections to CUPS servers is set
to 5 minutes in the CUPS libraries. The smbd hangs on startup
until the timeout is reached if the CUPS server is unreachable.
This parameter makes the timeout configurable. The default value
is set to 30 seconds.

Karolin
2008-09-23 16:57:58 -07:00
Jeremy Allison
c16f2907c5 Fix bug #5729. Explicitly allow "-valid".
Jeremy
(This used to be commit 4f2de29723)
2008-09-03 13:06:36 -07:00
Volker Lendecke
c529cd153f Increase the default positive idmap cache time to a week
(This used to be commit 60af636750)
2008-08-26 13:01:11 -07:00
Karolin Seeger
b90607e6e8 loadparm: idmap backend is not depracated any longer.
Karolin
(This used to be commit fcfab47036)
2008-08-22 10:06:26 +02:00
Jeremy Allison
79150da70b Here is a re-working of the winbindd
reconnect code to cope with rebooting a DC. This
replaces the code I asked Volker to revert.
The logic is pretty simple. It adds a new parameter,
"winbind reconnect delay", set to 30 seconds by
default, which determines how long to wait between
connection attempts.
To avoid overwhelming the box with DC-probe
forked children, the code now keeps track of
the DC probe child per winbindd_domain struct
and only starts a new one if the existing one
has died.
I also added a little logic to make sure the
dc probe child always sends a message whatever
the reason for exit so we will always reschedule
another connect attempt.
Also added documentation.
Jeremy.
(This used to be commit 8027197635)
2008-08-20 16:24:22 -07:00
Jeremy Allison
03991ab073 Fix bug 5686 - libsmbclient segfaults with more than one SMBCCTX.
Here is a patch to allow many subsystems to be re-initialized. The only
functional change I made was to remove the null context tracking, as the memory
allocated here is designed to be left for the complete lifetime of the program.
Freeing this early (when all smb contexts are destroyed) could crash other
users of talloc.
Jeremy.
(This used to be commit 8c630efd25)
2008-08-12 13:35:15 -07:00
Volker Lendecke
340ab6a256 idmap rewrite
(This used to be commit 30a180f2fc)
2008-08-12 11:28:29 +02:00
Michael Adam
bf291c95bc loadparm: add two parameters "init logon delay hosts" and "init logon delay"
"init logon delays hosts" takes a list of hosts names or addresses
or networks for which the initial SAMLOGON reply should be delayed
(so other DCs get preferred by XP workstations if there are any).
This option takes the same type of list as "hosts allow" does.

"init logon delay" allows one to configure the delay for the hosts
configured for delayed initial samlogon with "init logon delayed hosts".
The value is interpreted as milliseconds. The default value is 100.

This commit only introduces the parameters.
They will be activated in a subsequent commit.

Michael
(This used to be commit f7c1f85438)
2008-08-09 01:15:58 +02:00
Michael Adam
1a6aecaea8 testparm: Display warning if invalid values are used.
This one came up while using "csc policy = disabled" instead of
"disable"... ;-)
(This used to be commit d01da44de7)
2008-07-30 16:31:09 +02:00
Volker Lendecke
065fb506a2 Sequel to c10aad9f13: Ignore whitespaces in parametric options
It's a bit difficult to explain why

idmap config backend:FOO = rid

should work while

idmap config backend : FOO = rid

should not. And I doubt we will ever see domain names with whitespaces...
(This used to be commit 0207f99d3f)
2008-07-16 18:21:22 +02:00
Volker Lendecke
d11796d392 Tiny logic simplification: Remove an indentation by using an early return;
(This used to be commit 37dba0c192)
2008-07-16 18:21:17 +02:00
Volker Lendecke
ed5e6b3244 Remove a silly "typedef struct _param_opt_struct param_opt_struct"
(This used to be commit 78801431c8)
2008-07-16 18:21:11 +02:00
Jeremy Allison
24eec914c0 Fix swat. Bug #5613.
Jeremy
(This used to be commit 15920f8388)
2008-07-15 14:37:48 -07:00
Volker Lendecke
d5ccdcce0b Revert "Slightly increase the default idmap cache time"
This reverts commit 448836d44d.
(This used to be commit a9b29ab6b7)
2008-07-11 17:53:24 +02:00
Volker Lendecke
5515c0e81c Slightly increase the default idmap cache time
(This used to be commit 448836d44d)
2008-07-03 21:19:09 +02:00
Jeremy Allison
1fb1c67fb9 Patch from SATOH Fumiyasu <fumiyas@osstech.co.jp> for bug #5202. Re-activate "acl group control"
parameter and make it only apply to owning group. Also added man page fix.
Jeremy.
(This used to be commit e98e080bad)
2008-07-03 10:24:12 -07:00