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

968 Commits

Author SHA1 Message Date
Simo Sorce
f48e39540c Consolidate create/delete account paths in pdbedit
Use common paths like for smbpasswd, so that all utilities
behave the same way. As for smbpasswd this changes the behavior
of pdbedit to create/delete unix users is the add/delete user
scripts are provided, or ldapsam:editposix is configured.

Signed-off-by: Günther Deschner <gd@samba.org>
2009-05-29 18:03:56 +02:00
Björn Jacke
9a06f5e171 s3: make passdb backend defaults to tdbsam 2009-05-27 12:09:37 +02:00
Volker Lendecke
49ca690b4b Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STAT
This patch introduces

struct stat_ex {
        dev_t           st_ex_dev;
        ino_t           st_ex_ino;
        mode_t          st_ex_mode;
        nlink_t         st_ex_nlink;
        uid_t           st_ex_uid;
        gid_t           st_ex_gid;
        dev_t           st_ex_rdev;
        off_t           st_ex_size;
        struct timespec st_ex_atime;
        struct timespec st_ex_mtime;
        struct timespec st_ex_ctime;
        struct timespec st_ex_btime; /* birthtime */
        blksize_t       st_ex_blksize;
        blkcnt_t        st_ex_blocks;
};
typedef struct stat_ex SMB_STRUCT_STAT;

It is really large because due to the friendly libc headers playing macro
tricks with fields like st_ino, so I renamed them to st_ex_xxx.

Why this change? To support birthtime, we already have quite a few #ifdef's at
places where it does not really belong. With a stat struct that we control, we
can consolidate the nanosecond timestamps and the birthtime deep in the VFS
stat calls.

At this moment it is triggered by a request to support the birthtime field for
GPFS. GPFS does not extend the system level struct stat, but instead has a
separate call that gets us the additional information beyond posix. Without
being able to do that within the VFS stat calls, that support would have to be
scattered around the main smbd code.

It will very likely break all the onefs modules, but I think the changes will
be reasonably easy to do.
2009-05-26 17:48:23 +02:00
Stefan Metzmacher
d23a1935e8 s3:param: add PROTOCOL_SMB2
metze
2009-05-20 15:42:19 +02:00
Michael Adam
c085c8311d s3:swat: hide "config backend" from swat
Michael
2009-05-15 18:01:40 +02:00
Michael Adam
00297b74ac s3:param: prevent includes from being dumped in dump_*() functions.
This fixes bug #4271: testparm should not print includes.

Michael
2009-05-15 17:00:22 +02:00
Volker Lendecke
9c23115cb8 Add some const 2009-05-14 12:15:10 +02:00
Michael Adam
6708b926a4 s3:loadparm: free the file_list at the start of loadparm
This should reduce the waste of memory when using "config file"
or "config backend". It also reduces the risk of triggering
reloads due to some old unused files being checked.

Michael
2009-05-12 08:41:00 +02:00
Michael Adam
6aef9bbbf7 s3:loadparm: refactor freeing of file_list out into free_file_lists()
Michael
2009-05-12 08:41:00 +02:00
Steven Danneman
1db0b20d8a s3 Reorder loadparm to keep aliases together
This keeps the "browseable" and "browsable" aliases together.
2009-05-05 17:42:56 -07:00
Michael Adam
4842e45d59 s3:loadparm: handle registry config source in file_list - fixes bug #6320
Michael
2009-05-06 02:26:26 +02:00
Michael Adam
0ca795ef4f s3:loadparm: use the returnvalue of service_ok() in process_smbconf_service().
Michael
2009-05-05 17:58:00 +02:00
Michael Adam
077bcc1125 s3:smbd/service: switch load_registry_service/shares to use loadparm routines
instead of reading the registry directly with tdb and activating the
configure options by hand.

This eliminates the need for repeating checks done in loadparm.
For instance it disables registry shares without path in the server
as is the case with text based shares.

Michael
2009-04-29 02:20:19 +02:00
Michael Adam
fb3b657612 s3:loadparm: refactor process_registry_service out or process_registry_globals
Michael
2009-04-29 02:20:19 +02:00
Michael Adam
d5f2bbdc48 s3:loadparm: prevent infinite include nesting.
This introduces a hard coded MAX_INCLUDE_DEPTH of 100.
When this is exceeded, handle_include (and hence lp_load) fails.

One could of course implement a more intelligent loop detection
in the include-tree, but this would require some restructuring
of the internal loadparm housekeeping. Maybe as a second improvement
step.

Michael
2009-04-28 12:20:38 +02:00
Michael Adam
d16e40b5ef s3:mark registry shares without path unavailable just as with text config
This prevents users from getting access to "/" in misconfigured setups.

Michael
2009-04-28 11:40:26 +02:00
Günther Deschner
e1a76de03a s3-loadparm: Fix resume command typo for "printing = vlp".
Guenther
2009-04-13 17:08:17 +02:00
Karolin Seeger
4458809597 s3/loadparm: Fiy typos.
Karolin
2009-04-07 20:05:21 +02:00
Björn Jacke
4b184eaea1 s3/cups: add encryption support 2009-03-30 11:11:19 +02:00
Tim Prouty
866afd5d0b s3: Remove redundant comment 2009-03-23 11:55:58 -07:00
Stefan Metzmacher
c16c90a1cb s3:smbd: use new simplified snb_signing code in the server
We keep the seqnum/mid mapping in the smb_request structure.

This also moves one global variable into the
smbd_server_connection struct.

metze
2009-03-23 12:21:13 +01:00
Volker Lendecke
ddc1864fb2 Attempt to fix the build on IRIX 2009-03-04 12:28:39 +01:00
Steven Danneman
ac0d452ac6 s3: Wrap usage of rlimit in configure checks 2009-02-22 22:32:27 -08:00
Tim Prouty
1ff9696306 Revert "s3 auth: Add parameter that forces every user through an NSS lookup"
After the discussion on samba-technical, it was decided that the best
answer for now was to revert this change.  The right way to do this is
to rewrite the token api to use opaque tokens with pluggable modules.

This reverts commit 8e19a28805.
2009-02-21 14:00:14 -08:00
Volker Lendecke
2562723445 Fix an uninitialized variable 2009-02-21 12:49:01 +01:00
todd stecher
d9a842b26f S3: Detect max_open_files from system
- Attempt to use syscalls to determine max-open-files value.
- Add in periodic logging when max file limit reached
2009-02-20 16:35:48 -08:00
Zach Loafman
8e19a28805 s3 auth: Add parameter that forces every user through an NSS lookup
When set to yes, "force username map" forces every user, even AD
users, through an NSS lookup. This allows the token to be overridden
with information from NSS in certain broken environments.
2009-02-16 00:29:21 -08:00
Volker Lendecke
913c547cf6 Rename lp_smb_perfcount_module() to lp_perfcount_module() to match the parameter name 2009-02-14 22:01:03 +01:00
Steven Danneman
5cd4b7b7c0 s3: Added new parameter "map untrusted to domain"
When enabled this reverts smbd to the legacy domain remapping behavior when
a user provides an untrusted domain

This partially reverts d8c54fdd
2009-02-12 13:55:44 -08:00
todd stecher
54c51a66e3 S3: New module interface for SMB message statistics gathering
This changelist allows for the addition of custom performance
monitoring modules through smb.conf. Entrypoints in the main message
processing code have been added to capture the command, subop, ioctl,
identity and message size statistics.
2009-02-09 13:23:44 -08:00
Karolin Seeger
3f9daf434a s3/libads: Change "ldap ssl:ads" parameter to "ldap ssl ads".
Karolin
2009-02-05 15:55:14 +01:00
Dan Sledz
d96248a9b4 Add two new parameters to control how we verify kerberos tickets. Removes lp_use_kerberos_keytab parameter.
The first is "kerberos method" and replaces the "use kerberos keytab"
with an enum.  Valid options are:
secrets only - use only the secrets for ticket verification (default)
system keytab - use only the system keytab for ticket verification
dedicated keytab - use a dedicated keytab for ticket verification.
secrets and keytab - use the secrets.tdb first, then the system keytab

For existing installs:
"use kerberos keytab = yes" corresponds to secrets and keytab
"use kerberos keytab = no" corresponds to secrets only

The major difference between "system keytab" and "dedicated keytab" is
that the latter method relies on kerberos to find the correct keytab
entry instead of filtering based on expected principals.

The second parameter is "dedicated keytab file", which is the keytab
to use when in "dedicated keytab" mode.  This keytab is only used in
ads_verify_ticket.
2009-02-01 20:23:31 -08:00
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