1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

55520 Commits

Author SHA1 Message Date
Stefan Metzmacher
f8559b8238 talloc/testsuite: add infrastructure to test aborts
metze
2009-08-24 16:29:57 +10:00
Stefan Metzmacher
13227f83b9 talloc/testsuite: reset the globals after each subtest
metze
2009-08-24 16:29:57 +10:00
Stefan Metzmacher
1fbc86c57a talloc: call return after abort, because an overloaded abort function might not exit
This will be useful in the testsuite,
where we could check if an abort would happen.

metze
2009-08-24 16:29:57 +10:00
Stefan Metzmacher
2c664db749 talloc: report the size of reference handles as 0
metze
2009-08-24 16:29:57 +10:00
Stefan Metzmacher
d1895d2fee talloc: let talloc_total_blocks() and talloc_get_size() operate on the null_context
metze
2009-08-24 16:29:57 +10:00
Volker Lendecke
fced9dfc1e s3:winbind: Fallback to the forest root for lookupname
Thanks to Steven Danneman for watching me closely :-)
2009-08-23 10:19:32 +02:00
Volker Lendecke
1603c608c9 s3:winbind: Even on a domain controller, "our" domain is internal
It happens to be what we also share out via NETLOGON/SAMR, but winbind has
direct access to it via the passdb domain methods
2009-08-23 10:19:32 +02:00
Volker Lendecke
a0bf0cb0fb s3:winbind: Do not drop the first user in sam_query_user_list 2009-08-23 10:19:32 +02:00
Volker Lendecke
963419be1b s3:winbind: For internal domains it is pointless to connect to a DC 2009-08-23 10:19:32 +02:00
Volker Lendecke
fc3d427af8 s3:winbind: winbindd_dual_ndrcmd should output what it's doing 2009-08-23 10:19:32 +02:00
Volker Lendecke
a09b9ed9e2 s3:winbind: Fix the talloc hierarchy in wb_queryuser_done
We need to return state->userinfo beyond the end of wb_queryuser_recv, so the
unmarshalled strings are children of that, not the state that is lost sooner.

Metze, this scheme works fine as long as we only have a single malloc'ed
entity that is returned. I think we need a different scheme in the future
when we might have more than one independent object to be returned.
2009-08-23 10:19:32 +02:00
Jeremy Allison
da9356711b Implement Metze's suggestion of trying getpwuid(0) then getpwnam(root).
Jeremy.
2009-08-22 09:40:58 -07:00
Jeremy Allison
1fb916babd Log debug message when hires timestamps are available on the
share.
Jeremy.
2009-08-21 21:53:37 -07:00
Jeremy Allison
1af0aa92b3 Fix bug 6529 - Offline files conflict with Vista and Office 2003
On filesystems that can't store less than one second timestamps,
round the incoming timestamp set requests so the client can't discover
that a time set request has been truncated by the filesystem.
Needs backporting to 3.4, 3.3, 3.2 and (even) 3.0.
Jeremy
2009-08-21 21:44:21 -07:00
Jeremy Allison
47c7063dc6 Try and fix the buildfarm by using getpwnam(root) instead
of getpwuid(0) if DEVELOPER is defined. I'm hoping the
build farm defines DEVELOPER...
Jeremy.
2009-08-21 21:08:02 -07:00
Andrew Bartlett
497234c1cb s4:ntp_signd Fix bug 6656 - Set protocol version to 0, as used by ntpd
The change to protocol version 1 was not intentional, and broke the
protocol established with the ntp.org project.

Andrew Bartlett
2009-08-22 11:14:22 +10:00
Jeremy Allison
f9c0f88962 Fix coverity CID: 932 - forward null.
Jeremy.
2009-08-21 16:17:17 -07:00
Jeremy Allison
ba52f18bfe Fix for bug 6651 - smbd SIGSEGV when breaking oplocks.
Based on a patch submitted by Petr Vandrovec <petr@vandrovec.name>.
Multiple pending signals with siginfo_t's weren't being handled correctly
leading to smbd abort with kernel oplock signals.
Jeremy
2009-08-21 15:07:25 -07:00
Michael Adam
6afb02cb53 s3: fix bug #6650, authentication at member servers when winbindd is not running
Authentication of domain users on the member server fails when winbindd
is not running. This is because the is_trusted_domain() check  behaves
differently when winbindd is running and when it isn't:
Since wb_is_trusted_domain() calls wbcDomainInfo(), and this will also
give a result for our own domain, this succeeds for the member
server's own domain when winbindd is running. When winbindd is not
running, is_trusted_domain() checks (and possibly updates) the trustdom
cache, and this does the lsa_EnumTrustDom() rpc call to the DC which
does not return its own domain.

In case of winbindd not running, before 3.4, the domain part was _silently_
mapped to the workgroup in auth_util.c:make_user_info_map(),
which effectively did nothing in the member case.

But then the parameter "map untrusted to domain" was introduced
and the mapping was made to the workstation name instead of
the workgroup name by default unless "map untrusted to domain = yes".
(Commits
 d8c54fddda2dba3cbc5fc13e93431b152813892e,
 5cd4b7b7c03df6e896186d985b6858a06aa40b3f, and
 fbca26923915a70031f561b198cfe2cc0d9c3aa6)
This was ok as long as winbindd was running, but with winbindd not running,
these changes actually uncovered the above logic bug in the check.

So the correct check is to treat the workgroup as trusted / or known
in the member case. This is most easily achieved by not comparing the
domain name against get_global_sam_name() which is the host name unless
for a DC but against my_sam_name() which is the workgroup for a DC and for
a member, too. (These names are not very intuitive...)

I admit that this is a very long commit message for a one-liner, but this has
needed some tracking down, and I think the change deserves some justification.

Michael
2009-08-21 12:41:31 -07:00
Sam Liddicott
9d824dc115 s4:client
Put was assuming that the remote name was always absolute, and not relative to
the current remote directory.

Signed-off-by: Sam Liddicott <sam@liddicott.com>
2009-08-21 16:54:49 +02:00
Steve French
d20061abe3 Add missing CreateFile flags to smb.h 2009-08-21 15:02:10 +02:00
Andrew Bartlett
e71ce2f9e3 s4:ldb Python requires that a 'compare' handler return -1, 0 or 1 2009-08-21 17:51:52 +10:00
Andrew Bartlett
c49145b1ab s4:ldb Use length-limited printf to avoid walking off end of strings
This should ensure the debug messages do not have random characters at
their ends.

Andrew Bartlett
2009-08-21 17:50:50 +10:00
Andrew Bartlett
29ef1b2325 s4:kerberos Use MIT compatible names for these enc types
This is a small start on (ie, the only trivial part of) the work shown in:
http://k5wiki.kerberos.org/wiki/Projects/Samba4_Port#Samba.27s_use_of_Heimdal_symbols.2C_with_MIT_differences
(a table of all Kerberos symbols used in Samba4, and notes on where
they differ from those provided with MIT Kerberos)

Andrew Bartlett
2009-08-21 17:50:49 +10:00
Jeremy Allison
9b261a1211 Fix bug 6638 - ADS Domain Member: Computer Mgr can not set share ACLs
Add good error message for share modification denial.
Jeremy.
2009-08-20 11:08:21 -07:00
Günther Deschner
77a0a6e9a1 s3-idmap: fix two uninitialized variable warnings in idmap_tdb2.
Guenther
2009-08-20 15:29:16 +02:00
Volker Lendecke
4c69c151db s3:dsgetdcname: Fix a crash in dsgetdcname
When returning NT_STATUS_OK we can't leave *info == NULL, this crashes
in is_closest_site called from dsgetdcname().

Signed-off-by: Günther Deschner <gd@samba.org>
2009-08-20 14:26:46 +02:00
Volker Lendecke
68ea287617 s3:dsgetdcname: Inline dsgetdcname_cache_refresh
Signed-off-by: Günther Deschner <gd@samba.org>
2009-08-20 14:26:46 +02:00
Günther Deschner
f3c94f4b40 s4-spoolss: add stubs for new idl opcodes in spoolss server.
Guenther
2009-08-20 14:25:41 +02:00
Günther Deschner
062d26d57b s3-spoolss: add stubs for new idl opcodes in spoolss server.
Guenther
2009-08-20 14:25:41 +02:00
Günther Deschner
80e2500f02 s3: re-run make samba3-idl.
Guenther
2009-08-20 14:25:41 +02:00
Günther Deschner
0447af26b6 spoolss: add more spoolss calls to IDL
(spoolss_GetPrinterDriverPackagePath and spoolss_GetCorePrinterDrivers).

Guenther
2009-08-20 14:25:41 +02:00
Jeremy Allison
8c347ed177 Fix bug #6647 - get_root_nt_token: getpwnam("root") failed!
Not all systems may have a "root" user, but all must have a passwd
entry for a uid of zero.
Jeremy.
2009-08-19 16:55:26 -07:00
Jeremy Allison
33d27797d3 Fix Red Hat bugzilla bug : https://bugzilla.redhat.com/show_bug.cgi?id=516165
nautilus fails to copy files from an SMB share. This is a show-stopper
for 3.4.1 (I'll open a Samba.org bug). Although gnome-vfs is doing
*incredibly* stupid things by asking for a read size of 65535 - this
translates on the wire to a 65534 byte read followed by a 1 byte
read. Please send this back to the gnome developers that they
will ge horrid on the wire performance for this.
Jeremy.
2009-08-19 15:33:08 -07:00
Stefan Metzmacher
ecec01cc8f s3:smbd: implement SMB2 Find (Query Directory)
metze
2009-08-19 22:12:43 +02:00
Stefan Metzmacher
f00a3bfee7 s3:smbd: store a dirptr on the files_struct for SMB2 Query Directory
metze
2009-08-19 22:12:42 +02:00
Stefan Metzmacher
e621b7a52e s3:smbd: add a generic smbd_dirptr_lanman2_entry() function
This can we used by SMB2, the key difference between
SMB1 and SMB2 is that with SMB2 entries are aligned
to 8 bytes and there's no padding at the end of the last entry.

metze
2009-08-19 22:12:42 +02:00
Stefan Metzmacher
cf6e81f158 s3:smbd: implement all SMB2 Create contexts except "ExtA"
metze
2009-08-19 22:05:37 +02:00
Stefan Metzmacher
b70ae644ed s3:smbd: make smbd_check_open_rights() function non-static for use in SMB2
metze
2009-08-19 19:28:24 +02:00
Kai Blin
f143466504 s3 merged build: Don't build wbinfo twice.
Many, many thanks to Metze for telling me which chicken to sacrifice.
2009-08-19 12:39:45 +02:00
Michael Adam
5270efab1a tevent: fix a comment
Michael
2009-08-19 11:39:44 +02:00
Volker Lendecke
c54a8db006 Make refusal of SEC_DESC_DACL_PROTECTED configurable
This adds a parameter "gpfs:refuse_dacl_protected" that defaults to false.

GPFS has no place to store the SEC_DESC_DACL_PROTECTED ACL bit. With this
parameter we give customers an option to either ignore this bit or refuse
setting an ACL with it.
2009-08-19 11:39:44 +02:00
Stefan Metzmacher
5feff0ba01 s3:smbd: parse context blobs in SMB2 Create
metze
2009-08-19 10:14:49 +02:00
Andrew Tridgell
a0df109d66 added basic support for rename in DRS replication
Added simple DRS rename support in replication. This should be done
async, and I'm not sure if we should also do any repl data updates to
indicate the rename. I'm still learning how this stuff works, but at
least this allows a rename on a DC to propogate correctly
2009-08-19 15:53:19 +10:00
Andrew Tridgell
e38f38fe48 we need the Deleted Objects container for replication
When objects are deleted they get renamed to this container. The
container needs to exist when we provision
2009-08-19 15:51:07 +10:00
Kai Blin
8d0345e5a0 wbinfo: Fix up s3 blackbox test. wbinfo no longer needs a config file. 2009-08-18 22:10:04 +02:00
Kai Blin
dd8d04f9fa s4 winbind: Quiet down the WINBINDD_DOMAIN_INFO handler stub warning 2009-08-18 21:48:41 +02:00
Kai Blin
fd2feab8f0 wbinfo: Reduce test noise in the wbinfo blackbox test
With the switch to libwbclient the previously stubbed out
--trusted-domains and --all-domains calls now fail. Set them to knownfail.

The previously knownfail -D test is now stubbed out, test it now.

This does not fix the issues with wbinfo -a and wbinfo -K not working on the
build farm. I have no idea whatsoever what is causing this, as those are broken
on my local machine even without my changes.
2009-08-18 21:42:37 +02:00
Kai Blin
b31f0de467 s4 winbind: Silence compile warning by adding new commands to the list 2009-08-18 20:26:10 +02:00
Kai Blin
7cafb65387 s4 winbind: Implement a stubbed out version of WINBINDD_DOMAIN_INFO 2009-08-18 20:26:10 +02:00