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

55402 Commits

Author SHA1 Message Date
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
Kai Blin
bc0e0a4c69 wbinfo: Use one codebase for Samba3 and Samba4.
There can be only one....wbinfo that is.
2009-08-18 20:26:05 +02:00
Kai Blin
19855ca2bb s3 wbinfo: Only call afs_settoken_str if compiled with WITH_FAKE_KASERVER 2009-08-18 19:53:41 +02:00
Kai Blin
182c667b17 s3 wbinfo: use wbcSidTypeString instead of sid_type_lookup 2009-08-18 19:53:41 +02:00
Kai Blin
a7128709d2 libwbclient: Add wbcSidTypeString function. 2009-08-18 19:53:41 +02:00
Kai Blin
afb8f8eaa5 s3 wbinfo: Remove unused functions, use C99-types 2009-08-18 19:53:40 +02:00
Kai Blin
ab818cdf8b s3 wbinfo: Explicitly include popt header, remove unused common options. 2009-08-18 19:53:40 +02:00
Kai Blin
6d4fd3e0a2 s3 wbinfo: Use talloc_strdup instead of SMB_STRDUP 2009-08-18 19:53:40 +02:00
Kai Blin
0dae6f541f s3 wbinfo: Don't use global_myname() 2009-08-18 19:53:39 +02:00
Kai Blin
b6ea2ece09 s3 wbinfo: Avoid ADD_TO_ARRAY macro. 2009-08-18 19:53:39 +02:00
Kai Blin
90b6e41b83 s3 wbinfo: Use uint32_t instead of uint32 2009-08-18 19:53:39 +02:00
Kai Blin
fa7d7a49b8 s3 wbinfo: remove --get-auth-user and --set-auth-user functionality
Point to the corresponding commands in "net" instead.
2009-08-18 19:53:38 +02:00
Kai Blin
49d1eec8ea s3 net: Add getauthuser/setauthuser commands.
These replace the functionality of wbinfo --get-auth-user/--set-auth-user
2009-08-18 19:53:38 +02:00
Kai Blin
004494b84c s3 wbinfo: Get rid of lp_ functions
This commit also fixes a lot of line lengths to make the file more readable.
2009-08-18 19:53:38 +02:00
Kai Blin
f27bda63cd s4 ctags: Stop *_proto.h files from cluttering up the tags 2009-08-18 19:53:37 +02:00
Matthias Dieter Wallnöfer
61d4f8be60 s4: int32 handling: previous fix was not fully correct 2009-08-17 20:42:39 +02:00
Matthias Dieter Wallnöfer
2cf897b10a s4: Make the int32 problem more clear - and fix another error 2009-08-17 20:29:11 +02:00
Stefan Metzmacher
87737f8946 s4:librpc/rpc: fix DEBUG() message
metze
2009-08-18 11:58:18 +02:00
Günther Deschner
abe7648609 netlogon: document some more MSVC flags.
Some of these were observed during password changing
from win7 using a samba 3.4 PDC.

Guenther
2009-08-17 18:24:24 +02:00