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

83152 Commits

Author SHA1 Message Date
Andrew Bartlett
a4d1f2223a build: Add vfs_media_harmony to the waf build 2012-10-11 12:25:11 +11:00
Andrew Bartlett
bb99cf1f72 posixacls: Add IDL changes for vfs_acl_xattr using hash of the sys acl
This will isolate the hash of the ACL from any intermediate mapping that
the POSIX -> NT mapping subsystem might need to do, and which might
change if we need to correct that mapping.

Andrew Bartlett
2012-10-11 12:25:10 +11:00
David Disseldorp
5bb60df513 s3-rpc_server: fix build warning
enum dcerpc_transport_t is undeclared, include required headers.

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Wed Oct 10 12:41:28 CEST 2012 on sn-devel-104
2012-10-10 12:41:28 +02:00
Jeremy Allison
615951e4e7 Make sure the returned sd is on the right context, and if not it's always freed.
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Oct  9 23:35:50 CEST 2012 on sn-devel-104
2012-10-09 23:35:50 +02:00
Jeremy Allison
5afabdc976 Move setting of psd->dacl->revision and protect against null SD's. 2012-10-09 12:45:30 -07:00
Karolin Seeger
f88ab17993 docs: Add '-V' to the list of options.
Karolin

Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Tue Oct  9 18:53:12 CEST 2012 on sn-devel-104
2012-10-09 18:53:12 +02:00
Karolin Seeger
f9a4a9bfe1 samba-tool: Some more unifications...
in the usage message.

Karolin
2012-10-09 17:12:07 +02:00
Andreas Schneider
66018ea4fb packaging: Add config for systemd-tmpfiles.
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Oct  9 17:10:53 CEST 2012 on sn-devel-104
2012-10-09 17:10:53 +02:00
Andrew Bartlett
2f0753b456 samba-tool: skip chown in sysvolreset when it would fail on a GID
This skips the chown of the files if (for example) the domain Admins group
were to own the file and not be able to because the group maps only to a GID.

This essentially papers over the problem, but may be enough to get us past
the Samba 4.0 release.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Oct  9 15:24:44 CEST 2012 on sn-devel-104
2012-10-09 15:24:44 +02:00
Volker Lendecke
1c35c22e62 s3: Pass down smb_filename to smbacl4_fill_ace4
A full fsp is a bit overkill here

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Oct  9 13:38:49 CEST 2012 on sn-devel-104
2012-10-09 13:38:49 +02:00
Amitay Isaacs
e65a24b59f s4-rpc: dnsserver: Ignore DNS zones that are not used by RPC dnsserver
..TrustAnchors zone is not interpreted by RPC dnsserver code.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Tue Oct  9 03:21:07 CEST 2012 on sn-devel-104
2012-10-09 03:21:07 +02:00
Amitay Isaacs
d70f3644a4 s4-dns: dlz_bind9: Ignore zones that are not used by BIND9 DLZ plugin
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
2012-10-09 10:36:32 +11:00
Stefan Metzmacher
8746faf846 s4:scripting/python: add '-V' as alias for '--version'
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Oct  8 17:52:52 CEST 2012 on sn-devel-104
2012-10-08 17:52:52 +02:00
Stefan Metzmacher
309434a773 s4:samba-tool: allow 'samba-tool --version'
metze
2012-10-08 16:13:06 +02:00
Stefan Metzmacher
2fce71c89a s4:samba-tool: use normal option parsing in SuperCommand
We use the epilog to print the subcommands.

metze
2012-10-08 16:13:06 +02:00
Stefan Metzmacher
8d4943dcf9 s4:samba-tool: add optional epilog to _create_parser()
metze
2012-10-08 16:13:06 +02:00
Andreas Schneider
c12cc3cf9c s3fs-printing: Fix RAW printing for normal users.
This fixes bug #8769.

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Oct  8 16:11:51 CEST 2012 on sn-devel-104
2012-10-08 16:11:51 +02:00
Karolin Seeger
acea51cc37 samba-tool: Unify usage messages.
Karolin

Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Mon Oct  8 14:26:52 CEST 2012 on sn-devel-104
2012-10-08 14:26:51 +02:00
Karolin Seeger
8e259891d6 docs: Add man 8 samba-tool.
Addresses bug #8802 - Create missing manpages for new binaries.

Please note that it's a very basic version. Please feel free
to extend.

Karolin
2012-10-08 11:57:40 +02:00
Karolin Seeger
a2f3ec0577 samba-tool: Clarify usage of --help.
Karolin
2012-10-08 11:47:22 +02:00
Björn Baumbach
b1393d93bc docs: fix opening and ending tag mismatch: para
in forcedirectorysecuritymode.xml.
2012-10-08 11:14:42 +02:00
Björn Baumbach
a93c9e23f9 docs: fix opening and ending tag mismatch: para
in directorysecuritymask.xml.
2012-10-08 11:14:42 +02:00
Karolin Seeger
171bf9827b samba-tool: Fix typo in usage.
Karolin
2012-10-08 11:14:42 +02:00
Matthieu Patou
4b83c43ac2 s4-dns: fix a warning
Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Mon Oct  8 10:45:41 CEST 2012 on sn-devel-104
2012-10-08 10:45:40 +02:00
Matthieu Patou
ffab1d7cb2 s4-dns: Ignore zones that shouldn't be returned currently
RootDNSServers should never be returned (Windows DNS server don't)
..TrustAnchors should never be returned as is, (Windows returns
TrustAnchors) and for the moment we don't support DNSSEC so we'd better
not return this zone.
2012-10-07 22:11:48 -07:00
Matthieu Patou
95ea6d765b s4-join: factorize code, add info 2012-10-07 22:11:47 -07:00
Matthieu Patou
d57e0d8a6d s4-join: add some documentation 2012-10-07 22:11:47 -07:00
Matthieu Patou
193b15efea s4-repl: make dreplsrv_partition_find_for_nc return BAD_NC only 2012-10-07 21:51:03 -07:00
Matthieu Patou
dc002a394b drsuapi: Validate the input parameters for the drsuapi_UpdateRefs function 2012-10-07 21:51:03 -07:00
Matthieu Patou
8be6a106ab drsuapi: check more carefully the validity of the NC
Check that both the GUID and DN are the GUID/DN of a NC if not return
WERR_DS_DRA_BAD_NC
2012-10-07 21:51:03 -07:00
Matthieu Patou
8bbb4d7b51 drsuapi-idl: Fix the encoding of the source_dsa_dns
astring is not aligned and is not conformant
2012-10-07 21:51:03 -07:00
Matthieu Patou
97f0b8d9c9 drs-replica-info: level_not_supported is wrong when we do support (partialy the level) 2012-10-07 21:51:02 -07:00
Matthieu Patou
03c4dceaab lib-addns: ensure that allocated buffer are pre set to 0
It avoid bugs when one of the buffer is supposed to contain a string
that is not null terminated (ie. label->label) and that we don't force
the last byte to 0.
2012-10-07 21:51:02 -07:00
Matthieu Patou
85259635d6 ldap-server: sscanf result was never used to mistyped var 2012-10-07 21:51:02 -07:00
Matthieu Patou
97d0ad0c5e ldap-server: remove warning for the ret not being used 2012-10-07 21:51:02 -07:00
Matthieu Patou
5374334d68 s4-drs: fix the logic to allow REPL_SECRET if the account has GET_ALL_CHANGES 2012-10-07 21:51:02 -07:00
Matthieu Patou
8dbba524bf s4-drs: EXOP_REPL_SECRETS can be called by RW DC as well 2012-10-07 21:51:02 -07:00
Matthieu Patou
2eae16102a drs-getncchanges: do not set the highestUsn to 0
Paragraph 4.1.10.5 says that
         if err = 0 then
         msgOut.pNC := msgIn.pNC
         msgOut.usnvecFrom := msgIn.usnvecFrom
so no need to set the highestUsn to 0
2012-10-07 21:51:01 -07:00
Matthieu Patou
303ef62b29 kcc: return invalid parameter if the taskId is not 0 2012-10-07 21:51:01 -07:00
Matthieu Patou
f98abc7baa drs-crackname: if there is no sid do not return the domain 2012-10-07 21:51:01 -07:00
Matthieu Patou
e332f98909 devel-crackname: Print if count > 0 2012-10-07 21:51:01 -07:00
Matthieu Patou
9269870a70 Implement the LIST_INFO_FOR_SERVER input format 2012-10-07 21:51:01 -07:00
Matthieu Patou
3dd2b804b9 getdcinfo: Check that the server object has a serverreference objects pointing to a DC object
The problem was found by the DRSR testsuite where server objects were
created in the Site container without serverrefrence attribute
triggering error in the testsuite.
2012-10-07 21:51:01 -07:00
Rusty Russell
899cdc4503 ntdb: remove unused local variable.
Reported-by: Matthieu Patou <mat@samba.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date(master): Mon Oct  8 04:43:37 CEST 2012 on sn-devel-104
2012-10-08 04:43:36 +02:00
Volker Lendecke
9fc42daf75 s3: Add two tests a CLEAR_IF_FIRST crash
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sat Oct  6 17:16:39 CEST 2012 on sn-devel-104
2012-10-06 17:16:39 +02:00
Volker Lendecke
c62f8baff8 tdb: Make tdb robust against improper CLEAR_IF_FIRST restart
When winbind is restarted, there is a potential crash in tdb. Following
situation: We are in a cluster with ctdb. A winbind child hangs
in a request to the DC. Cluster monitoring decides the node has a
problem. Cluster monitoring decides to kill ctdbd. winbind child
still hangs in a RPC request. winbind parent figures that ctdb is
dead and immediately commits suicide. winbind parent is restarted by
cluster management, overwriting gencache.tdb with CLEAR_IF_FIRST. The
CLEAR_IF_FIRST logic as implemented now will not see that a child still
has the tdb open, only the parent holds the ACTIVE_LOCK due to performance
reasons. During the CLEAR_IF_FIRST logic is done, there is a very small
window where we ftruncate(tfd, 0) the file and re-write a proper header
without a lock. When during this small window the winbind child comes
back, wanting to store something into gencache.tdb, that winbind child
will crash with a SIGBUS.

Sounds unlikely? See:

[2012/09/29 07:02:31.871607,  0] lib/util.c:1183(smb_panic)
  PANIC (pid 1814517): internal error
[2012/09/29 07:02:31.877596,  0] lib/util.c:1287(log_stack_trace)
  BACKTRACE: 35 stack frames:
   #0 winbindd(log_stack_trace+0x1a) [0x7feb7d4ca18a]
   #1 winbindd(smb_panic+0x2b) [0x7feb7d4ca25b]
   #2 winbindd(+0x1a3cc4) [0x7feb7d4bacc4]
   #3 /lib64/libc.so.6(+0x32900) [0x7feb7a929900]
   #4 /lib64/libc.so.6(memcpy+0x35) [0x7feb7a97f355]
   #5 /usr/lib64/libtdb.so.1(+0x6e76) [0x7feb7b0b0e76]
   #6 /usr/lib64/libtdb.so.1(+0x3d37) [0x7feb7b0add37]
   #7 /usr/lib64/libtdb.so.1(+0x863d) [0x7feb7b0b263d]
   #8 /usr/lib64/libtdb.so.1(+0x8700) [0x7feb7b0b2700]
   #9 /usr/lib64/libtdb.so.1(+0x2505) [0x7feb7b0ac505]
   #10 /usr/lib64/libtdb.so.1(+0x25b7) [0x7feb7b0ac5b7]
   #11 /usr/lib64/libtdb.so.1(tdb_fetch+0x13) [0x7feb7b0ac633]
   #12 winbindd(gencache_set_data_blob+0x259) [0x7feb7d4d8449]
   #13 winbindd(gencache_set+0x53) [0x7feb7d4d85b3]
   #14 winbindd(gencache_del+0x5e) [0x7feb7d4d879e]
   #15 winbindd(saf_delete+0x93) [0x7feb7d54b693]
   #16 winbindd(+0xe507e) [0x7feb7d3fc07e]
   #17 winbindd(+0xe85e5) [0x7feb7d3ff5e5]
   #18 winbindd(+0xe65be) [0x7feb7d3fd5be]
   #19 winbindd(+0xe7562) [0x7feb7d3fe562]
   #20 winbindd(init_dc_connection+0x2e) [0x7feb7d3fe5be]
   #21 winbindd(+0xe75d9) [0x7feb7d3fe5d9]
   #22 winbindd(cm_connect_netlogon+0x58) [0x7feb7d3fe658]
   #23 winbindd(_wbint_PingDc+0x61) [0x7feb7d410991]
   #24 winbindd(+0x103175) [0x7feb7d41a175]
   #25 winbindd(winbindd_dual_ndrcmd+0xb7) [0x7feb7d4107d7]
   #26 winbindd(+0xf8609) [0x7feb7d40f609]
   #27 winbindd(+0xf9075) [0x7feb7d410075]
   #28 winbindd(tevent_common_loop_immediate+0xe8) [0x7feb7d4db198]
   #29 winbindd(run_events_poll+0x3c) [0x7feb7d4d93fc]
   #30 winbindd(+0x1c2b52) [0x7feb7d4d9b52]
   #31 winbindd(_tevent_loop_once+0x90) [0x7feb7d4d9f60]
   #32 winbindd(main+0x7b3) [0x7feb7d3e7aa3]
   #33 /lib64/libc.so.6(__libc_start_main+0xfd) [0x7feb7a915cdd]
   #34 winbindd(+0xce2a9) [0x7feb7d3e52a9]

This is in a winbind child, logfiles surrounding indicate the parent
was restarted.

This patch takes all chain locks around the CLEAR_IF_FIRST introduced
tdb_new_database.
2012-10-06 13:23:42 +02:00
Rusty Russell
37fd93194d tdb: Make robust against shrinking tdbs
When probing for a size change (eg. just before tdb_expand, tdb_check,
tdb_rescue) we call tdb_oob(tdb, tdb->map_size, 1, 1).  Unfortunately
this does nothing if the tdb has actually shrunk, which as Volker
demonstrated, can actually happen if a "longlived" parent crashes.

So move the map/update size/remap before the limit check.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-10-06 13:23:41 +02:00
Jeremy Allison
828793852f We should never just assign an st_mode to an ace->perms field, theoretically
they are different so should go through a mapping function. Ensure this is so.

Practically this does not matter, as for user permissions the mapping
function is an identity, and the extra bits we may add are ignored
anyway, but this makes the intent clear.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Oct  6 03:04:14 CEST 2012 on sn-devel-104
2012-10-06 03:04:14 +02:00
Jeremy Allison
47ebc8fbc9 Modify ensure_canon_entry_valid() into ensure_canon_entry_valid_on_set() - makes the logic clearer. 2012-10-05 15:48:07 -07:00
Jeremy Allison
9466cd189d Simplify ensure_canon_entry_valid by splitting out the _get codepath. 2012-10-05 15:09:06 -07:00