1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
Commit Graph

22641 Commits

Author SHA1 Message Date
Jeremy Allison
ebb53d7288 r23513: Fix one more use of VALUE_PREFIX.
Jeremy.
(This used to be commit fca5637dc6)
2007-10-10 12:23:24 -05:00
Jeremy Allison
72099d8f66 r23512: Fix conflict in #define for SECDESC_PREFIX. Ensure all
reg #defines use "REG_" prefix. Michael - please check
gcc warnings on compiles.
Jeremy.
(This used to be commit 7885b68bb5)
2007-10-10 12:23:23 -05:00
James Peach
b1ce226af8 r23510: Tidy calls to smb_panic by removing trailing newlines. Print the
failed expression in SMB_ASSERT.
(This used to be commit 171dc060e2)
2007-10-10 12:23:23 -05:00
Michael Adam
aa4110e6f2 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.
(This used to be commit 24b0cbcb37)
2007-10-10 12:23:23 -05:00
Jeremy Allison
cc35d1300d r23508: Fix sync_file() to return NTSTATUS and return this
on failure in the write path.
Jeremy.
(This used to be commit cd3f7dbee8)
2007-10-10 12:23:23 -05:00
Michael Adam
43d59b7d42 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
(This used to be commit 6fd7114049)
2007-10-10 12:23:22 -05:00
Michael Adam
9bb19474d7 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
(This used to be commit 31d64767fc)
2007-10-10 12:23:22 -05:00
James Peach
4a3e4db1cd r23502: Restore exit-on-idle. Small refactoring for clarity. Exit if
we are idle and we timed out waiting for something to do.
(This used to be commit b4ab1a0cd9)
2007-10-10 12:23:22 -05:00
Volker Lendecke
59c872103d r23501: Move notify_rename before rename_internals_fsp and call it from there.
(This used to be commit 8d3828871c)
2007-10-10 12:23:22 -05:00
Volker Lendecke
9c4d185ef0 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
(This used to be commit b599e5b1e1)
2007-10-10 12:23:22 -05:00
Gerald Carter
bca15dbc68 r23497: Disable building of libaddns (no defined API) and
libmsrpc (unmaintained).
(This used to be commit 13d78ace49)
2007-10-10 12:23:22 -05:00
Gerald Carter
7f7ef53720 r23496: Fix logic error in getgrnam_recv() that broke
getgrnam() for machine and domain local groups.
(This used to be commit 4d4c1eca30)
2007-10-10 12:23:21 -05:00
Michael Adam
fd3dbb4a48 r23495: Replace literal occurrences of libsmb/errormap.o by $(ERRORMAP_OBJ).
(This used to be commit 2041c35a30)
2007-10-10 12:23:21 -05:00
Michael Adam
6c674deb97 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
(This used to be commit 02685358d1)
2007-10-10 12:23:21 -05:00
Michael Adam
9426d78f1e 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
(This used to be commit 30d71cf4b8)
2007-10-10 12:23:21 -05:00
Volker Lendecke
184eb775ff r23486: Ok, this time with a hopefully successful make test in the right place:
Remove two local variables
(This used to be commit 575e594e93)
2007-10-10 12:23:21 -05:00
Michael Adam
6090601c8b 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
(This used to be commit efd3e2bfb7)
2007-10-10 12:23:21 -05:00
Günther Deschner
0b86e40306 r23484: When chasing AD referrals make sure to honor the base returned from the server.
Guenther
(This used to be commit 865bdcacae)
2007-10-10 12:23:20 -05:00
Volker Lendecke
4944a5227c r23483: Revert 23482, I must have run 'make test' in the wrong subdir.
(This used to be commit 1ce0c582bc)
2007-10-10 12:23:20 -05:00
Volker Lendecke
c03c86232c r23482: Slightly simplify the rename code: Remove two local variables that are
not really needed.
(This used to be commit e068e38ef3)
2007-10-10 12:23:20 -05:00
James Peach
94f284e631 r23480: Fix DEVELOPER_CFLAGS quoting.
(This used to be commit 4cdc7eaac7)
2007-10-10 12:23:20 -05:00
James Peach
6e631e5fb5 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.
(This used to be commit 4b392a76eb)
2007-10-10 12:23:20 -05:00
Gerald Carter
b4a39dc10e r23477: Build farm fix: Use int rather than MIT's krb5_int32 when setting context flags.
(This used to be commit 903145e957)
2007-10-10 12:23:19 -05:00
James Peach
274782432b r23475: Fix the prototype for sys_broken_setgroups and log *BSD group list
truncation a bit more verbosely.
(This used to be commit e3ea997289)
2007-10-10 12:23:19 -05:00
Gerald Carter
4caefdf348 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.
(This used to be commit cbd33da9f7)
2007-10-10 12:23:19 -05:00
Gerald Carter
bfbf08adff r23472: add missing default setting for 'winbind nss info' (merge from 3.0.26)
(This used to be commit 1f80f9d145)
2007-10-10 12:23:19 -05:00
Gerald Carter
78d6b95e18 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.
(This used to be commit 3d3a813035)
2007-10-10 12:23:19 -05:00
James Peach
2cbe284e59 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.
(This used to be commit 07f562be7a)
2007-10-10 12:23:18 -05:00
Volker Lendecke
8b2637631e r23469: Fix a comment
(This used to be commit 47cc9359aa)
2007-10-10 12:23:18 -05:00
Michael Adam
a2762cfcaa 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
(This used to be commit ebe2ea8f22)
2007-10-10 12:23:18 -05:00
Volker Lendecke
0e0fed6f25 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.
(This used to be commit f3d582cb90)
2007-10-10 12:23:18 -05:00
Volker Lendecke
719df44c03 r23466: Fix RAW-NOTIFY: by using delete on close the notify is triggered deep
inside close_file() already.
(This used to be commit 0b29e3ad0f)
2007-10-10 12:23:18 -05:00
Michael Adam
46906b2c75 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
(This used to be commit dfc4217870)
2007-10-10 12:23:18 -05:00
Michael Adam
6f28dc588c r23460: Re-add whitespace to reduce diff between branches.
Sorry for the noise...

Michael
(This used to be commit c7d004dec4)
2007-10-10 12:23:17 -05:00
Michael Adam
00323dc738 r23459: Remove one superfluous cast.
(This used to be commit beed875507)
2007-10-10 12:23:17 -05:00
Michael Adam
cb7f45560f r23458: Cosmetic fix in debug output.
(This used to be commit 03dbdb561a)
2007-10-10 12:23:17 -05:00
Volker Lendecke
062a411c12 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.
(This used to be commit 0342ce7057)
2007-10-10 12:23:17 -05:00
Jeremy Allison
28bc066aa8 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.
(This used to be commit c23e08cc09)
2007-10-10 12:23:17 -05:00
Jeremy Allison
5aadea741f r23448: Doh ! Don't call winbind_child_died() *before* the
kill call as that sets pid = 0 ! :-).
Jeremy.
(This used to be commit bcfce39094)
2007-10-10 12:23:17 -05:00
Jeremy Allison
a5f3e848c0 r23447: Add kill signal to child dead path. After talking
to Jerry add to 3.0.25b.
Jeremy.
(This used to be commit ade91e78cb)
2007-10-10 12:23:16 -05:00
Volker Lendecke
07d2301040 r23446: Restore Jeremy's original formatting, just fix the comment.
(This used to be commit 5b983957e3)
2007-10-10 12:23:16 -05:00
Jeremy Allison
cacbe41945 r23445: Fix suggested by Volker. Don't call rename_open_files
if the name wasn't changed.
Jeremy.
(This used to be commit 7a9629365e)
2007-10-10 12:23:16 -05:00
Michael Adam
4a6aaabe6f r23434: Coorect a comment.
(This used to be commit c9f38fa30e)
2007-10-10 12:23:16 -05:00
Michael Adam
5d14172c15 r23433: remove superfluous semicolon.
(This used to be commit b8269f4543)
2007-10-10 12:23:16 -05:00
Michael Adam
9af7b35db0 r23432: Remove superfluous comment.
(A relict from regkey_open_internal days.)

Michael
(This used to be commit 4025cbc202)
2007-10-10 12:23:16 -05:00
Volker Lendecke
d9f7cbacb0 r23429: Ooops, sorry.
Revert an accidential checkin of r23410.

Volker
(This used to be commit 23ecb5439f)
2007-10-10 12:23:15 -05:00
Volker Lendecke
501d97c653 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.
(This used to be commit 6729a4df4b)
2007-10-10 12:23:15 -05:00
Jeremy Allison
9ae6e51616 r23425: Volker noticed this obvious fix for the wins server
code :-). Thanks Volker !
Jeremy.
(This used to be commit e3f33a2a50)
2007-10-10 12:23:15 -05:00
Jeremy Allison
24e05d4df2 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.
(This used to be commit 0c7ce6a682)
2007-10-10 12:23:15 -05:00
James Peach
0d5265e9d4 r23423: Use the correct structure types in the NT_ACL operations. It's not
clear to my why the catia module feels it's necessary to implement
these operations, but at least they're now the right type.
(This used to be commit b5be0c7403)
2007-10-10 12:23:15 -05:00