1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-28 17:47:29 +03:00

22642 Commits

Author SHA1 Message Date
Jeremy Allison
03763bc528 r23514: Remove unused function ads_get_dn_from_extended_dn().
Jeremy.
2007-10-10 12:23:24 -05:00
Jeremy Allison
fca5637dc6 r23513: Fix one more use of VALUE_PREFIX.
Jeremy.
2007-10-10 12:23:24 -05:00
Jeremy Allison
7885b68bb5 r23512: Fix conflict in #define for SECDESC_PREFIX. Ensure all
reg #defines use "REG_" prefix. Michael - please check
gcc warnings on compiles.
Jeremy.
2007-10-10 12:23:23 -05:00
James Peach
171dc060e2 r23510: Tidy calls to smb_panic by removing trailing newlines. Print the
failed expression in SMB_ASSERT.
2007-10-10 12:23:23 -05:00
Michael Adam
24b0cbcb37 r23509: This activates the global options from the registry in loadparm.
The global options are stored as values in the subkey "global"
of the SMBCONF registry key.

The activation is accomplished in smb.conf though a new special
semantic of the "include" parameter: "include = registry" triggers
the processing of the registry global options exactly at the
position of the include statement. Options read from the registry
take the same precedence as parameters loaded from a file via
include. Need to reload the registry globals is detected by
watching the tdb sequence number.

Registry shares are automatically activated when the registry
globals are processed.

So a "registry only" configuration can be realized by an
smb.conf that looks as follows:

================================
[global]
include = registry
================================

The global options and registry shares can be conveniently
edited with the "net conf" utility.

Caveat:

A possible pitfall consists in using "include = registry"
together with the "lock directory" directive in the registry.
This problem will be addressed in the next time.

Note on the code:

Processing of the registry options is accomplished by a function
process_registry_globals() in loadparm.c The current version is
only an interim solution: It is handcoded instead of using the
infrastructure of reg_api.c. The reason for this is that using
reg_api still has too large linker dependencies, bloating virtually
all targets by PASSDB_OBJ, SMBLDAP_OBJ, GROUPDB_OBJ and LDB stuff.
A version of process_registry_globals that uses reg_api is
included but commented out. The goal is to eventually refactor
and restructure the registry code so that one can use the reg_api
to access only the registry tdb and not link all the dynamic
backends with all their linking implications.
2007-10-10 12:23:23 -05:00
Jeremy Allison
cd3f7dbee8 r23508: Fix sync_file() to return NTSTATUS and return this
on failure in the write path.
Jeremy.
2007-10-10 12:23:23 -05:00
Michael Adam
6fd7114049 r23507: Split one general function normalize_dbkey from reg_db.c into util_reg.c
(To be used in other place in subsequent commit.)

Michael
2007-10-10 12:23:22 -05:00
Michael Adam
31d64767fc r23504: Use tdb_wrap_open (instead of usual tdb_open) in reg_db.
This eliminates the need of maintaining reg_db's own
reference counter for the tdb. Maybe as a next step...

Michael
2007-10-10 12:23:22 -05:00
James Peach
b4ab1a0cd9 r23502: Restore exit-on-idle. Small refactoring for clarity. Exit if
we are idle and we timed out waiting for something to do.
2007-10-10 12:23:22 -05:00
Volker Lendecke
8d3828871c r23501: Move notify_rename before rename_internals_fsp and call it from there. 2007-10-10 12:23:22 -05:00
Volker Lendecke
b599e5b1e1 r23500: Two changes to survive the now activated test for rename_internals_fsp:
With the target being open we have to return NT_STATUS_ACCESS_DENIED and
root_fid != 0 leads to NT_STATUS_INVALID_PARAMETER
2007-10-10 12:23:22 -05:00
Gerald Carter
13d78ace49 r23497: Disable building of libaddns (no defined API) and
libmsrpc (unmaintained).
2007-10-10 12:23:22 -05:00
Gerald Carter
4d4c1eca30 r23496: Fix logic error in getgrnam_recv() that broke
getgrnam() for machine and domain local groups.
2007-10-10 12:23:21 -05:00
Michael Adam
2041c35a30 r23495: Replace literal occurrences of libsmb/errormap.o by $(ERRORMAP_OBJ). 2007-10-10 12:23:21 -05:00
Michael Adam
02685358d1 r23494: Synchronize some occurrences of BINARY_PREREQS and bin/.dummy.
Further reduce the diff between 3_0 and 3_0_26 by some reformatting
and rearrangements.

Michael
2007-10-10 12:23:21 -05:00
Michael Adam
30d71cf4b8 r23489: (Re-)Add tdbtorture as a build target to 3_0_26.
Add the tdbtorture test to the test script in 3_0 and 3_0_26.

Michael
2007-10-10 12:23:21 -05:00
Volker Lendecke
575e594e93 r23486: Ok, this time with a hopefully successful make test in the right place:
Remove two local variables
2007-10-10 12:23:21 -05:00
Michael Adam
efd3e2bfb7 r23485: This checkin consists mostly of refactorings in preparation of the
activation of global registry options in loadparm.c, mainly to
extract functionality from net_conf.c to be made availabel elsewhere
and to minimize linker dependencies.

In detail:

* move functions registry_push/pull_value from lib/util_reg.c to new file
  lib/util_reg_api.c

* create a fake user token consisting of builtin administrators sid and
  se_disk_operators privilege by hand instead of using get_root_nt_token()
  to minimize linker deps for bin/net.

  + new function registry_create_admin_token() in new lib/util_reg_smbconf.c
  + move dup_nt_token from auth/token_util.c to new file lib/util_nttoken.c
  + adapt net_conf.c and Makefile.in accordingly.

* split lib/profiles.c into two parts: new file lib/profiles_basic.c
  takes all the low level mask manipulation and format conversion functions
  (se_priv, privset, luid). the privs array is completely hidden from
  profiles.c by adding some access-functions. some mask-functions are not
  static anymore.

  Generally, SID- and LUID-related stuff that has more dependencies
  is kept in lib/profiles.c

* Move initialization of regdb from net_conf.c into a function
  registry_init_regdb() in lib/util_reg_smbconf.c.

Michael
2007-10-10 12:23:21 -05:00
Günther Deschner
865bdcacae r23484: When chasing AD referrals make sure to honor the base returned from the server.
Guenther
2007-10-10 12:23:20 -05:00
Volker Lendecke
1ce0c582bc r23483: Revert 23482, I must have run 'make test' in the wrong subdir. 2007-10-10 12:23:20 -05:00
Volker Lendecke
e068e38ef3 r23482: Slightly simplify the rename code: Remove two local variables that are
not really needed.
2007-10-10 12:23:20 -05:00
James Peach
4cdc7eaac7 r23480: Fix DEVELOPER_CFLAGS quoting. 2007-10-10 12:23:20 -05:00
James Peach
4b392a76eb r23478: Change the handling of the developer CFLAGS so that they are always
emited to the Makefile in the DEVELOPER_CFLAGS variable. This makes
it easy to turn developer mode on and off without waiting for
configure to run. The developer flags are only added to CFLAGS for
the --enable-developer and --enable-krb5developer cases.
2007-10-10 12:23:20 -05:00
Gerald Carter
903145e957 r23477: Build farm fix: Use int rather than MIT's krb5_int32 when setting context flags. 2007-10-10 12:23:19 -05:00
James Peach
e3ea997289 r23475: Fix the prototype for sys_broken_setgroups and log *BSD group list
truncation a bit more verbosely.
2007-10-10 12:23:19 -05:00
Gerald Carter
cbd33da9f7 r23474: Here's a small patch that disables the libkrb5.so replay cache
when verifying a ticket from winbindd_pam.c.

I've found during multiple, fast, automated SSH logins (such
as from a cron script) that the replay cache in MIT's krb5
lib will occasionally fail the krb5_rd_req() as a replay attack.

There seems to be a small window during which the MIT krb5
libs could reproduce identical time stamps for ctime and cusec
in the authenticator since Unix systems only give back
milli-seconds rather than the micro-seconds needed by the
authenticator.  Checked against MIT 1.5.1.  Have not
researched how Heimdal does it.

My thinking is that if someone can spoof the KDC and TDS
services we are pretty hopeless anyways.
2007-10-10 12:23:19 -05:00
Gerald Carter
1f80f9d145 r23472: add missing default setting for 'winbind nss info' (merge from 3.0.26) 2007-10-10 12:23:19 -05:00
Gerald Carter
3d3a813035 r23471: Here's a rough patch for expanding domain group membership
in the winbindd_getgrnam() call.  Couple of comments:

* Adds "winbind expand groups" parameter which defines the
  max depth winbindd will expand group members.  The default
  is the current behavior of one level of expansion.
* The entire getrgnam() interface should be async.  I
  haven't done that.
* Refactors the domain users hack in fill_grent_mem() into
  its own function.
2007-10-10 12:23:19 -05:00
James Peach
07f562be7a r23470: Fix supplementary group list truncation for *BSD. We need to pass
the correct group list length and only truncate to NGROUPS_MAX if
it is too long.
2007-10-10 12:23:18 -05:00
Volker Lendecke
47cc9359aa r23469: Fix a comment 2007-10-10 12:23:18 -05:00
Michael Adam
ebe2ea8f22 r23468: Open registry.tdb with sequence number.
Add a function to retrieve the registry db sequence number.

This is in preparation of loadparm integration of registry global
smb.conf options: this will allow to detect changes in order to trigger reload.

Michael
2007-10-10 12:23:18 -05:00
Volker Lendecke
f3d582cb90 r23467: Next little simplification: In rename_internals it's a bit pointless to
first ask for existence of a file when we do the open_file_ntcreate in
can_rename later on anyway. That also gets us the right error message in
case the file is not there automatically.
2007-10-10 12:23:18 -05:00
Volker Lendecke
0b29e3ad0f r23466: Fix RAW-NOTIFY: by using delete on close the notify is triggered deep
inside close_file() already.
2007-10-10 12:23:18 -05:00
Michael Adam
dfc4217870 r23465: There was this diff between reg_printing in 3_0 and 3_0_26:
before writing to secdesc_buf->sd,
3_0 checked secdesc_buf->sd while 3_0_26 checked secdesc_buf->sd_size.

This patch makes both revisions check _both_ befor writing.

Jerry / Jeremy : please check if this is correct!

Michael
2007-10-10 12:23:18 -05:00
Michael Adam
c7d004dec4 r23460: Re-add whitespace to reduce diff between branches.
Sorry for the noise...

Michael
2007-10-10 12:23:17 -05:00
Michael Adam
beed875507 r23459: Remove one superfluous cast. 2007-10-10 12:23:17 -05:00
Michael Adam
03dbdb561a r23458: Cosmetic fix in debug output. 2007-10-10 12:23:17 -05:00
Volker Lendecke
0342ce7057 r23457: After Jeremy's ack:
The attached patch removes a little race condition for
people with real kernel oplock support, and reduces some
code paths. It changes reply_unlink to open_file_ntcreate,
set_delete_on_close and close_file.

The race condition happens if we break the oplock in
can_delete via open_file_ntcreate, we close the file,
someone else gets a batch oplock and we try to unlink.

It reduces code paths by calling SMB_VFS_UNLINK in 2 fewer
places.
2007-10-10 12:23:17 -05:00
Jeremy Allison
c23e08cc09 r23450: max_params_return is complete fiction when getting a changenotify
request. Ignore it. Should fix bug #4689 but more tests and
valgrinding will follow.
Jeremy.
2007-10-10 12:23:17 -05:00
Jeremy Allison
bcfce39094 r23448: Doh ! Don't call winbind_child_died() *before* the
kill call as that sets pid = 0 ! :-).
Jeremy.
2007-10-10 12:23:17 -05:00
Jeremy Allison
ade91e78cb r23447: Add kill signal to child dead path. After talking
to Jerry add to 3.0.25b.
Jeremy.
2007-10-10 12:23:16 -05:00
Volker Lendecke
5b983957e3 r23446: Restore Jeremy's original formatting, just fix the comment. 2007-10-10 12:23:16 -05:00
Jeremy Allison
7a9629365e r23445: Fix suggested by Volker. Don't call rename_open_files
if the name wasn't changed.
Jeremy.
2007-10-10 12:23:16 -05:00
Michael Adam
c9f38fa30e r23434: Coorect a comment. 2007-10-10 12:23:16 -05:00
Michael Adam
b8269f4543 r23433: remove superfluous semicolon. 2007-10-10 12:23:16 -05:00
Michael Adam
4025cbc202 r23432: Remove superfluous comment.
(A relict from regkey_open_internal days.)

Michael
2007-10-10 12:23:16 -05:00
Volker Lendecke
23ecb5439f r23429: Ooops, sorry.
Revert an accidential checkin of r23410.

Volker
2007-10-10 12:23:15 -05:00
Volker Lendecke
6729a4df4b r23426: Correct a comment. The default timeout is not 1min, but 30s. While
there, do some reformatting.

Jeremy, I think we should also kill the child. It might hang in
something (an fcntl lock for example) that the next child might run into
immediately again.
2007-10-10 12:23:15 -05:00
Jeremy Allison
e3f33a2a50 r23425: Volker noticed this obvious fix for the wins server
code :-). Thanks Volker !
Jeremy.
2007-10-10 12:23:15 -05:00
Jeremy Allison
0c7ce6a682 r23424: Thanks to Jerry, we finally tracked down the :
winbindd: Exceeding 200 client connections, no idle connection found"
bug #3204. This fixes it in Jerry's testing !
Jeremy.
2007-10-10 12:23:15 -05:00