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

30618 Commits

Author SHA1 Message Date
Günther Deschner
449ab398f5 s3-spnego: Fix Bug #6815. Windows 2008 R2 SPNEGO negTokenTarg parsing failure.
When parsing a SPNEGO session setup retry (falling back from KRB5 to NTLMSSP),
we failed to parse the ASN1_ENUMERATED negResult in the negTokenTarg, thus
failing spnego_parse_auth() completely.

By just using the shared spnego/asn1 code, we get the parsing the correct way.

Guenther
2009-10-15 14:41:22 +02:00
Björn Jacke
dc586b933d s3: fix outdated proto.h causing build error on AIX
Matthias, please check!
2009-10-15 10:27:34 +02:00
Jeremy Allison
1c1a883bd0 Fix the build, missing ->.
Jeremy.
2009-10-14 12:36:02 -07:00
Jeremy Allison
ce4542fbde Final part of fix for bug 6793 - winbindd crash with "INTERNAL ERROR: Signal 6"
Don't use mapped_user uninitialized.
Jeremy.
2009-10-14 11:16:03 -07:00
Volker Lendecke
c6fc461e71 s3:winbind: Fix a double-free
Part of a fix for bug #6793.
2009-10-14 11:15:53 -07:00
Volker Lendecke
db29d3eb40 s3:winbind: Fix bug 6793 -- segfault in winbindd_pam_auth 2009-10-14 11:14:57 -07:00
Günther Deschner
67b544ba96 s3-build: we need to have talloc 2.0.1 when building with external talloc.
2.0.0 did not got the exports right.
This and the 2.0.1 talloc fixes resolve bug #6808.

Guenther
2009-10-14 17:45:59 +02:00
Günther Deschner
075303560f s3-passdb: missed two prototypes while moving to enum netr_SchannelType.
Guenther
2009-10-14 15:26:14 +02:00
Björn Jacke
e33c23dc5c s3:net: simplify padding to single printf call 2009-10-14 00:22:08 +02:00
Björn Jacke
6deb1fcc88 s3:net simplify padding to single printf call 2009-10-14 00:19:35 +02:00
Volker Lendecke
8a27fdea89 s3:net: Fix a segfault in "net rpc trustdom list" for overlong domain names
That was a complicated way to say "%-20.s"... But that code was from 2002 ...
2009-10-13 23:09:05 +02:00
Jeremy Allison
3f5c077f2d Remove use of "int ret" when we already have errcode.
Jeremy.
2009-10-13 13:28:57 -07:00
Jeremy Allison
df22f8dbd9 Catch one more erroneous use of errno.
Jeremy.
2009-10-13 13:03:39 -07:00
Olaf Flebbe
367cb714a3 correctly handle aio_error() and errno 2009-10-13 12:59:23 -07:00
Volker Lendecke
94d5417d10 s3:torture: Add a notify-bench test
This is a test that creates and deletes files in a directory as fast as the
network allows it. At the same time, it opens a filechangenotify. This test is
done to just torture handling a single directory together with the notify
infrastructure.
2009-10-13 20:34:25 +02:00
Volker Lendecke
1302526a74 s3:libsmb: Add cli_notify 2009-10-13 20:34:25 +02:00
Volker Lendecke
f3869f90f5 s3:rpc: Fix is_known_pipename for dynamically loaded pipes 2009-10-13 20:34:25 +02:00
Volker Lendecke
1341d4509c s3: Fix some nonempty blank lines 2009-10-13 20:34:24 +02:00
Andrew Tridgell
6e48aad3be s3: Fix vfs_shadow_copy2 to allow in-path @GMT-xxx 2009-10-13 20:34:24 +02:00
Olaf Flebbe
5ec557d9f6 s3/loadparm: Fix severe HPUX compiler issue.
Members of struct should be initialized explictly.
Fixes bug #6804.
2009-10-13 18:38:39 +02:00
Günther Deschner
a3306e352d s3-winbindd: add wbint_ChangeMachineAccount implementation.
Guenther
2009-10-13 12:42:44 +02:00
Günther Deschner
ebe0e64ba9 s3: use enum netr_SchannelType all over the place.
Guenther
2009-10-13 10:21:46 +02:00
Günther Deschner
aa8c142b5e s3-netlogon: allow to change any type of trust account password in trust_pw_find_change_and_store_it().
Guenther
2009-10-13 10:21:42 +02:00
Günther Deschner
4a1b50afd5 s3-netlogon: pass down account name to remote password set functions.
Guenther
2009-10-13 00:07:45 +02:00
Björn Jacke
faad888e1a ѕ3: fix domain trust documentation confusion
fix some trusted/trusting mixups, make documentation more precise
and man page more verbose.
2009-10-12 22:42:27 +02:00
Karolin Seeger
8def289c8e s3/proto.h: Add lp_ldap_ref_follow prototype.
Fix build of smbldap.

Karolin
2009-10-12 12:52:29 +02:00
Jan Engelhardt
c5d5969e24 s3/smbldap: add option to disable following LDAP refs
Fix bug #6717.
2009-10-12 11:34:58 +02:00
Simo Sorce
7bce1ab5e8 Fix builds with external tdb
Make sure we do not reference our internal tdb directly.
Let configure define what tdb.h file to use so that builds that use an
extrenal tdb do not include 2 different versions of the tdb header.
2009-10-11 09:48:53 -04:00
Matt Kraai
815b790c96 Use the method used by build_env.sh to discover the user name.
so try USERNAME, then LOGNAME, then whoami, then id -un to find out who we
are.
2009-10-11 12:44:42 +02:00
Simo Sorce
99cdbe3571 Fix builds with external talloc
Make sure we do not reference our internal talloc directly.
Let configure define what talloc.h file to use so that builds that use an
extrenal talloc do not include 2 different versions of the talloc header.
2009-10-09 13:14:08 -04:00
Jeremy Allison
333fcba1de Cope with old CIFSFS clients that use SMBunlink to remove
symlinks instead of trans2:posix_unlink.
Jeremy.
2009-10-08 15:36:36 -07:00
Björn Jacke
76f73c73ea s3: make linking of libwbclient --as-needed safe
Partly fixes #6791. Thanks to Buchan Milne!
2009-10-09 00:24:18 +02:00
Volker Lendecke
f0fd5df7fd s3: Fix shadow copy display on Windows 7
Windows 7 is a bit more picky on our NT_STATUS_BUFFER_TOO_SMALL. Announce the
right buffer size, the same amount we later check for.
2009-10-08 14:07:07 +02:00
Günther Deschner
efaa98e824 s3-winbindd: NDR_WBINT_CHECKMACHINEACCOUNT should not be cacheable.
Guenther
2009-10-08 10:40:42 +02:00
Matthias Dieter Wallnöfer
607ceff234 s3/s4 - Adapt the IDL changes on various locations 2009-10-08 09:50:19 +02:00
Jeremy Allison
14dc32a4f5 Oops. Don't break the build..
Jeremy.
2009-10-07 15:43:43 -07:00
Jeremy Allison
94ce06f01d Make the logic a lot clearer and fix the comment to match.
Jeremy
2009-10-07 15:39:38 -07:00
Jeremy Allison
746fb5aa4f Correct fix for bug 6781 - Cannot rename subfolders in Explorer view with recent versions of Samba.
Without this fix, renaming a directory ./a to ./b, whilst a directory ./aa was already open
would fail.
Jeremy.
2009-10-07 15:14:50 -07:00
Günther Deschner
3c3725a340 s3-winbindd: libwbclient: implement secure channel verification for specific domains in wbcCheckTrustCredentials().
Guenther
2009-10-07 11:18:18 +02:00
Günther Deschner
3d3134a7d6 s3-netlogon: pure cosmetic indent fixes in _netr_LogonControl2Ex().
Guenther
2009-10-07 10:36:22 +02:00
Günther Deschner
fea2a78beb s3: re-run make samba3-idl.
Guenther
2009-10-07 10:34:15 +02:00
Jeremy Allison
7709db4c03 Test creating and deleting a bad symlink using the POSIX calls. Ensure
we don't regress on bug 6769.
Jeremy.
2009-10-06 17:18:15 -07:00
Volker Lendecke
a4aa38f8b9 s3:winbind: Make query_user_list in winbindd_rpc a bit more readable 2009-10-06 21:33:20 +02:00
Abhidnya P Chirmule
ac774c4969 s3: Add access_mask to the flock VFS call 2009-10-06 18:52:06 +02:00
Günther Deschner
c344bf0184 s3-winbindd: make sure to reset connections when machine account password change chain was broken.
Guenther
2009-10-06 16:50:23 +02:00
Günther Deschner
0c2fc9eedf s3-netlogon: setup NETLOGON credential chain in rpccli_netlogon_set_trust_password() only when needed.
Guenther
2009-10-06 16:50:23 +02:00
Volker Lendecke
872f9c4f91 Revert "s3: Attempt to fix machine password change"
This reverts commit 20a8ea91e1.

Ooops, this should not have been committed.
2009-10-05 22:14:06 +02:00
Volker Lendecke
5bafaa73f6 s3:winbind: Slightly simplify the logic of nss_init(), make it static 2009-10-05 22:12:35 +02:00
Volker Lendecke
f88e95c6b0 s3:winbind: Fix typos 2009-10-05 22:12:34 +02:00
Volker Lendecke
20a8ea91e1 s3: Attempt to fix machine password change 2009-10-05 22:12:20 +02:00
Jeremy Allison
3fa1d7332c Fix bug 6776 - Running overlapping Byte Lock test will core dump Samba daemon.
Re-write core of POSIX locking logic.
Jeremy.
2009-10-05 10:27:48 -07:00
Günther Deschner
55b12d032c s3-net: print error when "net rpc changetrustpw" has failed.
Guenther
2009-10-05 13:01:53 +02:00
Volker Lendecke
84de81b478 s3: Remove a scary error message -- talloc_move can not fail :-)
Signed-off-by: Günther Deschner <gd@samba.org>
2009-10-05 12:14:08 +02:00
Volker Lendecke
d696f9a7ed s3: Fix nonempty blank lines
Signed-off-by: Günther Deschner <gd@samba.org>
2009-10-05 12:14:08 +02:00
Günther Deschner
926457ec95 s3: remove unused PRS_POINTER_CAST macro.
Guenther
2009-10-05 11:05:21 +02:00
Günther Deschner
2497f70257 s3: remove unused SYSTEMTIME struct.
Guenther
2009-10-05 11:05:21 +02:00
Björn Jacke
984d001cae s3:Makefile: another attempt to fix the wbclient dependency
in the dependencies we always used a variable that was not jet defined.
2009-10-04 02:20:21 +02:00
Björn Jacke
71229dde1e s3:Makefile: another attempt to fix the netapi dependency
in the dependencies we always used a variable that was not jet defined.
2009-10-04 02:20:21 +02:00
Björn Jacke
a45716400d s3:Makefile: another attempt to fix the tdb dependency
in the dependencies we always used a variable that was not jet defined.
2009-10-04 02:20:21 +02:00
Björn Jacke
da597f2df0 s3:Makefile: another attempt to fix the talloc dependency
in the dependencies we always used a variable that was not jet defined.
2009-10-04 02:20:21 +02:00
Björn Jacke
63dedac08f Revert "s3:Makefile: fix talloc dependencies with static build (2nd try)"
This reverts commit b60d87c207.
2009-10-04 02:20:20 +02:00
Björn Jacke
19794ea541 Revert "s3:Makefile: fix libtdb dependencies with static build"
This reverts commit da15726630.
2009-10-04 02:20:20 +02:00
Björn Jacke
be348842f5 Revert "s3:Makefile: fix libwbclient dependencies with static build"
This reverts commit d7795f2afa.
2009-10-04 02:20:20 +02:00
Björn Jacke
eae87ffb3f Revert "s3:Makefile: fix libnetapi dependencies with static build"
This reverts commit 110897a057.
2009-10-04 02:20:20 +02:00
Volker Lendecke
d5bd2ec251 s3:winbind: use wb_fill_pwent in wb_getpwsid 2009-10-04 00:14:01 +02:00
Volker Lendecke
c83b80435b s3:winbind: No point in using strequal to detect a 0-length string 2009-10-04 00:14:01 +02:00
Volker Lendecke
2bd3994ac3 s3:winbind: use talloc_tos() instead of NULL in fillup_pw_field 2009-10-03 16:43:16 +02:00
Volker Lendecke
dc56d42aa3 s3:winbind: Fix a debug message 2009-10-03 16:39:10 +02:00
Volker Lendecke
70e1d816b3 s3: Make default_[static|shared]_modules a bit more readable 2009-10-03 14:39:51 +02:00
Björn Jacke
777143ef53 s3:Makefile: minor clean up 2009-10-03 00:22:54 +02:00
Björn Jacke
110897a057 s3:Makefile: fix libnetapi dependencies with static build
analogical to previous libtalloc fix
2009-10-03 00:22:53 +02:00
Björn Jacke
fbb6571367 s3:Makefile: eventlogadm dependency cleanup
no need to link against popt lib
2009-10-03 00:22:53 +02:00
Björn Jacke
d7795f2afa s3:Makefile: fix libwbclient dependencies with static build
analogical to previous libtalloc fix
2009-10-03 00:22:53 +02:00
Björn Jacke
da15726630 s3:Makefile: fix libtdb dependencies with static build
analogical to previous libtalloc fix
2009-10-03 00:22:53 +02:00
Björn Jacke
b60d87c207 s3:Makefile: fix talloc dependencies with static build (2nd try)
When configure options --with-libtalloc=no --enable-shared-libs=no are used,
LIBTALLOC_TARGET stays empty. Actually LIBTALLOC_TARGET which is only used for
Makefile dependencies is obsolete as LIBTALLOC contains exactly the targets
that we depend on, libtalloc finally is the target to depend on.
2009-10-03 00:22:52 +02:00
Björn Jacke
99c4480674 Revert "s3:Makefile: fix talloc dependencies with static build"
This reverts commit 2af2334522.

a more correct way to fix the libtalloc dependencies follows
2009-10-03 00:22:52 +02:00
Björn Jacke
7124b4fbeb s3:Makefile: libsmbsharemode dependency cleanup
no need to link against ldap and krb5 libs
2009-10-03 00:22:52 +02:00
Björn Jacke
09936d52d2 s3:Makefile: net utility dependency cleanup
no need to link against iniparser lib
2009-10-03 00:22:52 +02:00
Björn Jacke
e1ebadb85b s3:configure: use --aѕ-needed linker option when supported
Based on a patch from Andreas Schneider but modified that --aѕ-needed is also
used when own libs are not build shared (--enable-shared). Also change order of
options so that user supplied LDFLAGS are put *after* the automatic --aѕ-needed
flag. This way it's pollible to force not use as-needed by setting LDFLAGS
environment variable to "-Wl,--no-as-needed".
2009-10-03 00:22:51 +02:00
Jeremy Allison
6f22cd10ad Remove lots of duplicate code and move it into one
function vfs_stat_fsp(). Stops code looking at fsp->posix_open
except for exceptional circumstances.
Jeremy.
2009-10-02 13:45:38 -07:00
Jeremy Allison
1cebf2dad1 Missed one VFS_STAT -> VFS_LSTAT
Jeremy.
2009-10-02 11:07:17 -07:00
Jeremy Allison
1e322cf6a9 Fix more use of VFS_STAT when posix pathnames selected.
Jeremy.
2009-10-02 11:05:03 -07:00
Andrew Tridgell
4cb055cacd ds-flags: use the new name DS_DNS_FOREST_ROOT
Update to use the new DS_DNS_FOREST_ROOT name, which makes it clearer
what this bit means (according to MS-ADTS doc)
2009-10-02 12:02:00 +10:00
Andrew Tridgell
5d60a7e23e s3-ads: removed 3 unused defines
These are in nbt.idl and netlogon.idl as well, no need to have them
here under different names, especially when the comments are wrong
2009-10-02 12:01:59 +10:00
Jeremy Allison
ce791d6645 Fix bug #6769 - symlink unlink does nothing.
Always use LSTAT for POSIX pathnames.
Jeremy.
2009-10-01 16:54:06 -07:00
Björn Jacke
2af2334522 s3:Makefile: fix talloc dependencies with static build
When configure options --with-libtalloc=no --enable-shared-libs=no are used,
LIBTALLOC_TARGET stays empty. Actually LIBTALLOC_TARGET which is only used for
Makefile dependencies is obsolete as LIBTALLOC contains exactly the targets
that make the dependencies are. Obnox, pleaѕe check!
2009-10-01 19:27:37 +02:00
Björn Jacke
0265891cfc s3:configure: don't throw away PRINT_LIBS
PRINT_LIBS might have been set before intentionally, so don't thow it away.
2009-10-01 19:27:37 +02:00
Björn Jacke
e9616e4c6d s3: update comment about (deprecated) a6 records 2009-10-01 19:27:37 +02:00
Jeremy Allison
00ce3e143f Fix for CVE-2009-2813.
===========================================================
== Subject:     Misconfigured /etc/passwd file may share folders unexpectedly
==
== CVE ID#:     CVE-2009-2813
==
== Versions:    All versions of Samba later than 3.0.11
==
== Summary:     If a user in /etc/passwd is misconfigured to have
==              an empty home directory then connecting to the home
==              share of this user will use the root of the filesystem
==              as the home directory.
===========================================================
2009-10-01 10:23:29 -07:00
Karolin Seeger
75f90772ce s3/VERSION: Raise version number up to 3.6.0.
Karolin
2009-10-01 14:50:28 +02:00
Jeremy Allison
8a6b90d401 Fix for CVE-2009-2906.
Summary:
Specially crafted SMB requests on
authenticated SMB connections can send smbd
into a 100% CPU loop, causing a DoS on the
Samba server.
2009-10-01 14:32:36 +02:00
Günther Deschner
e80891db41 s3-perfcount: more cleanup.
Guenther
2009-10-01 12:19:48 +02:00
Günther Deschner
25ab8828a1 s3-perfcount: only pass down prs_struct when really required.
Guenther
2009-10-01 12:19:48 +02:00
Günther Deschner
cd82d4ba56 s3: add perfcount idl and generated files.
Guenther
2009-10-01 12:19:43 +02:00
Günther Deschner
c6a7ecf28b s3-registry: move rpccli_winreg_Connect to the only file it belongs.
Guenther
2009-10-01 11:40:31 +02:00
Günther Deschner
bbc71486a7 s3: remove unused rpcstr_pull and rpcstr_pull_talloc.
Guenther
2009-10-01 11:40:31 +02:00
Günther Deschner
347eb9b970 s3-printing: more use of pull_reg_sz().
Guenther
2009-10-01 11:40:31 +02:00
Günther Deschner
ad836c4d48 s3-registry: use pull_reg_sz() where appropriate.
(and move away from rpcstr_pull and rpcstr_pull_talloc).

Guenther
2009-10-01 11:40:30 +02:00
Olaf Flebbe
087ba21b41 allow for outstanding_aio_calls to be decremented 2009-09-30 15:20:09 -07:00
Günther Deschner
bbf394f36d s3-printing: use regval_ctr_addvalue_multi_sz.
Guenther
2009-09-30 16:23:40 +02:00
Günther Deschner
05e8e90976 s3-registry: add regval_ctr_addvalue_multi_sz.
Guenther
2009-09-30 16:23:33 +02:00
Günther Deschner
afdea18fcf s3-rpc_parse: remove unused prs_string.
Guenther
2009-09-30 16:22:34 +02:00
Kamen Mazdrashki
0e1840b84a w32err: WERR_GROUP_NOT_FOUND renamed to WERR_GROUPNOTFOUND
In Win 32 we have
NERR_GroupNotFound which maps to WERR_GROUP_NOT_FOUND currently
and we have
ERROR_GROUP_NOT_FOUND which maps to nothing, so it is to be added

Signed-off-by: Anatoliy Atanasov <anatoliy.atanasov@postpath.com>
2009-09-30 15:48:41 +03:00
Kamen Mazdrashki
d9994a604b w32err: WERR_DC_NOT_FOUND replaced with WERR_DCNOTFOUND
It turns out in win32 ERROR_DC_NOT_FOUND exists and it is
an error for Device Context (DC), not Domain Controller

Signed-off-by: Anatoliy Atanasov <anatoliy.atanasov@postpath.com>
2009-09-30 15:48:40 +03:00
Günther Deschner
6c0abbdd35 s3-netlogon: properly implement _netr_NetrEnumerateTrustedDomains().
Guenther
2009-09-30 00:37:13 +02:00
Günther Deschner
eb7a404225 s3: remove unused unistr2_term_codes.
Guenther
2009-09-30 00:36:05 +02:00
Günther Deschner
26e798da19 s3: remove unused regval_convert_multi_sz().
Guenther
2009-09-30 00:34:01 +02:00
Günther Deschner
2ccf75d9a9 s3: remove unused regval_build_multi_sz().
Guenther
2009-09-30 00:33:54 +02:00
Günther Deschner
76bb380839 s3-rpc_parse: remove unused UNISTR2 struct and init function.
Guenther
2009-09-30 00:33:47 +02:00
Günther Deschner
b0a66496f5 s3: use pull_reg_multi_sz in rpcclient and net.
Guenther
2009-09-30 00:31:42 +02:00
Günther Deschner
fc1c243348 s3-util: use pull_reg_multi_sz in reg_pull_multi_sz.
Guenther
2009-09-30 00:31:17 +02:00
Günther Deschner
661342ee2f s3-registry: use pull_reg_multi_sz().
Guenther
2009-09-30 00:30:59 +02:00
Günther Deschner
f8016cfee9 s3-util: add pull_reg_sz() and pull_reg_multi_sz() convenience functions.
Guenther
2009-09-30 00:30:47 +02:00
Günther Deschner
2d6e5e160b s3: use push_reg_multi_sz().
Guenther
2009-09-30 00:30:25 +02:00
Günther Deschner
1b0f3b7e3a s3-registry: use regval_ctr_addvalue_sz().
Greatly simplifies and cleanes up the code.

Guenther
2009-09-30 00:30:12 +02:00
Günther Deschner
a50cc61ee6 s3-registry: add regval_ctr_addvalue_sz.
Guenther
2009-09-30 00:29:56 +02:00
Günther Deschner
2c11b73391 s3-registry: use push_reg_sz().
Guenther
2009-09-30 00:29:49 +02:00
Günther Deschner
fcee9d2c97 s3-util: add push_reg_sz() and push_reg_multi_sz() convenience functions.
Guenther
2009-09-30 00:29:24 +02:00
Volker Lendecke
0cf317f36f s3: Remove the lua interpreter again
This was meant to support async winbind. But as the hairy parts of async
winbind (getgrent) are done without it, it can go again.
2009-09-29 13:51:43 +02:00
Jeremy Allison
325baf37ff Don't defer a talloc_move'd pointer.
Jeremy.
2009-09-28 21:36:15 -07:00
Jeremy Allison
2e989bab07 Second part of fix for bug #6235 - domain enumeration breaks if master browser has space in name.
Ensure we ask for the #20 name as we're using it as a server.
Jeremy.
2009-09-28 11:23:30 -07:00
Volker Lendecke
80ef513e90 s3:winbind: remove a pointless initialization 2009-09-28 19:50:51 +02:00
Volker Lendecke
2185490176 s3:gencache: Add my copyright 2009-09-28 19:47:19 +02:00
Volker Lendecke
dc8538b405 s3:winbind: Make check_info3_in_group, sanitize its memory handling 2009-09-28 17:54:20 +02:00
Volker Lendecke
f18d0b036c s3:winbind: Make "check_request_flags" publically available 2009-09-28 17:54:20 +02:00
Volker Lendecke
def5bf57c5 s3:winbind: Sanitize the args for find_auth_domain: It only needs the flags 2009-09-28 17:54:20 +02:00
Volker Lendecke
93db77adcb s3:winbind: Make append_data publically available as append_auth_data 2009-09-28 17:54:20 +02:00
Karolin Seeger
388470f1f3 s3/VERSION: Raise version up to 3.5.0.
Karolin
2009-09-28 16:57:29 +02:00
Christian Ambach
de0f3b657d changed debuglevel for two messages in the GPFS module from 0 to 10 they spammed the logs on a test machine and they are just debug messages, so let's move them to the level of the other debug messages in the file
Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
2009-09-28 16:37:28 +02:00
Matthias Dieter Wallnöfer
fb1eb11267 s3:smbd/password - move list pointers into blocks 2009-09-25 10:59:13 +02:00
Günther Deschner
0650423edf s3-libndr: fix build warning.
Guenther
2009-09-25 11:46:51 +02:00
Stefan Metzmacher
bfd3a6f13a s3:winbindd_cm: don't invalidate the whole connection when just samr gave ACCCESS_DENIED
metze
2009-09-25 08:18:45 +02:00
Stefan Metzmacher
68b8149d1f s3:rpc_client: don't randomly fragment rpc pdu's in developer mode
This is really confusing and also breaks against windows,
as it doesn't accept fragmented bind requests.

metze
2009-09-25 05:20:16 +02:00
Jeremy Allison
1e4868d251 Reduce debug log level from 0 -> 7 on non-critical message.
Jeremy.
2009-09-24 17:44:45 -07:00
Jeremy Allison
536c4dd2d6 Revert b39c390280 - casts should not
be here.
Jeremy.
2009-09-24 15:44:28 -07:00
Jeremy Allison
4f10aa5973 Revert 918b5a7e05. This code
should *not* return const.
Jeremy.
2009-09-24 15:42:36 -07:00
Matthias Dieter Wallnöfer
b39c390280 s3: Fix up various string "const" warnings
My changed introduced some warnings. Fix them.
2009-09-24 23:58:36 +02:00
Matthias Dieter Wallnöfer
918b5a7e05 s3:util_str "str_list_make_v3" - introduce also here the "const" result
I did this to match with the default util strlist library.
2009-09-24 23:58:19 +02:00
Matthias Dieter Wallnöfer
506b0b6435 s3:vfs_default - correct function parameters 2009-09-24 23:49:41 +02:00
Günther Deschner
c789d041f0 s3-winbindd: no reason to call winbindd_can_contact_domain() three times in query_user().
Guenther
2009-09-24 22:55:38 +02:00
Günther Deschner
4b01e378d2 s3: remove unused printing macros.
Guenther
2009-09-24 22:55:29 +02:00
Steven Danneman
60433b154d s3 onefs: Fix 1 second share mode delay handling
When racing to the open and loosing we may get a share_mode violation.
In this case handle the 1-second delay via a defferred open properly.

This requires us to retrieve the share_mode_lock before deferring
open so we don't dereference a NULL pointer assuming we already had
the lck because we were the first opener.
2009-09-24 11:31:35 -07:00
Steven Danneman
74c0a7a1d3 s3 onefs: Fix a race condition exists in onefs_open.c between multiple opens to the same file.
Two openers can stat a file at the same time, see that it doesn't exist,
and then both race to open it first.  The loser will enter
onefs_open_file_ntcreate believing that the file doesnt exist, and thus
skip any current state lookups for that file.  This includes setting
the file_id, and having a valid stat buffer.

Normally on first create the file_id will be set during the open, but
the second opener in this scenario may fail the open (oplock/share mode)
and file_id will not be set, nor will the stat buffer be valid.

In the error paths of this patch, we now double check that the file_id
and the stat buffer are valid before doing other operations.
2009-09-24 11:31:21 -07:00
Zack Kirsch
5e9aade516 s3 onefs: Add some debugging/asserts to give more info when there is bad deferred open state.
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-09-24 11:19:00 -07:00
Tim Prouty
86b1a4cb86 s3: Add more helpful debugging to some of the streams code 2009-09-24 10:59:33 -07:00
Aravind Srinivasan
32ee976708 vfs catia: Fix a NULL dereference when CATIA is loaded with no mappings specified.
When we use the CATIA vfs module and don't have any mapping specified,
we return NULL for the mapped_name, thereby resulting in segfaults.
When we don't have catia mapping, we should just use the old name
instead of returning NULL for the mapped_name.

Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-09-24 10:59:33 -07:00
Aravind Srinivasan
637901c242 vfs catia: Fix the double translation that was happening with createfile and open.
Since the catia translation is implemented for open, it should not
also be done in createfile.  By removing createfile from catia,
translation is now done correctly for the primary open path.

In order to support systems that have custom createfile
implementations that don't eventually call SMB_VFS_OPEN,
SMB_VFS_TRANSLATE_NAME has been expanded to take an additional
argument that specifies direction.

Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-09-24 10:59:33 -07:00
Aravind Srinivasan
c870043b27 vfs catia: Fix a possible NULL dereference
Also free some unfreed memory.

Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-09-24 10:59:33 -07:00
Volker Lendecke
50f248a06c s3: Forgot to check in one build failure for vfs_gpfs.c 2009-09-24 13:11:46 +02:00
Volker Lendecke
69447de175 s3: Remove an unused variable 2009-09-24 13:11:46 +02:00
Volker Lendecke
568f818a0f s3: Make the vfs_gpfs compile at least
Not sure whether it works in this state :-)
2009-09-24 12:55:14 +02:00
Stefan Metzmacher
f8425b73d7 Revert "s3:winbindd: use a tcp connection for lsa in case lookup_names/lookup_sids doesn't work over ncacn_np"
This reverts commit f23691cffd.

This should not have been commited...

metze
2009-09-24 06:45:10 +02:00
Stefan Metzmacher
9ef39406d8 s3:rpc_server: we need to make a copy of my_name in serverinfo_to_SamInfo_base()
This is important for the case the server_info already contains a logon_server.

metze
2009-09-24 06:41:13 +02:00
Günther Deschner
f23691cffd s3:winbindd: use a tcp connection for lsa in case lookup_names/lookup_sids doesn't work over ncacn_np
metze
2009-09-24 06:41:11 +02:00
Volker Lendecke
cd749ef8bd s3:gencache: Make gencache_del() return success for expired entries
This fixes nasty error messages from "net cache flush"
2009-09-23 18:50:33 +02:00
Volker Lendecke
aece84f22d s3:gencache: Remove some over-paranoid locking 2009-09-23 18:50:33 +02:00
Volker Lendecke
76d95b9a2d s3:gencache: Add a "was_expired" argument to gencache_get_data_blob
This is set to true if the routine returns failure due to an existing but
expired entry.
2009-09-23 18:50:33 +02:00
Volker Lendecke
0724649a8a s3:winbind: Fix an uninitialized variable 2009-09-23 06:25:24 +02:00
Michael Adam
1544c2b66c build: use AS_HELP_STRING() for --with-localedir
Michael
2009-09-23 00:53:47 +02:00
Michael Adam
bb77a2a8ae build: add switch "--with-codepagedir=DIR" to configure.
This is to address bug #6444.

Michael
2009-09-23 00:53:47 +02:00
Michael Adam
8b795534bd build: add datadir to "make showlayout"
Michael
2009-09-23 00:53:47 +02:00
Günther Deschner
6a8ef6c424 s3-winbindd: Fix Bug #6711: trusts to windows 2008 (2008 r2) not working.
Winbindd should always try to use LSA via an schannel authenticated ncacn_ip_tcp
connection when talking to AD for LSA lookup calls.

In Samba <-> W2k8 interdomain trust scenarios, LookupSids3 and LookupNames4 via an
schannel ncacn_ip_tcp LSA connection are the *only* options to successfully resolve
sids and names.

Guenther
2009-09-22 16:49:31 +02:00
Günther Deschner
58f2deb940 s3-winbindd: add cm_connect_lsa_tcp().
Guenther
2009-09-22 11:38:06 +02:00
Stefan Metzmacher
9801ec5f1a s3:secrets_schannel: revert to using version 1
It doesn't really matter if the entries
have invalid context in it. Older versions of samba
refuse to open the file if the version doesn't match.

If we can't parse individual records, we'll fail schannel binds,
but the clients are supposed to reestablish the netlogon secure channel
by doing ServerReqChallenge/ServerAuthenticate* again. This
will just overwrite the old record.

metze
2009-09-21 06:33:25 +02:00
Stefan Metzmacher
83edf3e43e s3:winbindd: avoid writing to a closed connection and generate SIGPIPE
metze
2009-09-21 06:05:43 +02:00
Stefan Metzmacher
00e378f17c s3:lib/select: don't overwrite errno in the signal handler
metze
2009-09-21 05:55:05 +02:00
Andrew Bartlett
59bea84362 libcli:nbt move prototypes of lmhosts functions to libnbt.h 2009-09-19 14:34:16 -07:00
Günther Deschner
a4b5c792c5 s3-rpc_client: fix non initialized structure in rpccli_lsa_lookup_sids_noalloc.
Guenther
2009-09-18 21:32:45 +02:00
Günther Deschner
700df9b27a s3-smbd: fix get_ea_names_from_file() and check for pnames pointer.
This fixes smbd from crashing all the time.

Jeremy, Volker, please check.

Guenther
2009-09-18 21:31:37 +02:00
Volker Lendecke
77afcad8f0 s3: Fix Coverity ID 581 -- NEGATIVE_RETURNS 2009-09-18 20:20:39 +02:00
Volker Lendecke
30a4695b27 s3:smbstatus: Fix bug 6703, allow smbstatus as non-root
We only require a ctdb connection when clustering is enabled. This limits the
restriction for only-root smbstatus to the clustering case.
2009-09-18 18:32:25 +02:00
Volker Lendecke
89e80bfe4f s3:smbstatus: Fix some nonempty blank lines 2009-09-18 18:32:23 +02:00
Andrew Tridgell
a3f33356bb s3-rpc: samba3 needs the DCERPC_NDR64 define 2009-09-17 21:52:28 -07:00
Volker Lendecke
44674efc81 s3:smbd: Attempt to fix the build on HP/UX 2009-09-18 03:42:45 +02:00
Volker Lendecke
eeda7f6449 s3:smbd: Fix an inappropriate pointer return in a bool fn 2009-09-18 03:35:18 +02:00
Volker Lendecke
1637364c9e s3:winbind: Fix some enum type mismatches found by the Solaris compiler 2009-09-18 03:31:22 +02:00
Björn Jacke
9e49ad558e s3: build with pam support when possible 2009-09-17 21:05:54 +02:00
Jeremy Allison
b92c399d97 Check in modified generated files for systems where pidl can't run.
Jeremy.
2009-09-17 11:16:54 -07:00
Kouhei Sutou
f8dae40fc8 spnego: Support ASN.1 BIT STRING and use it in SPNEGO.
Signed-off-by: Günther Deschner <gd@samba.org>
2009-09-17 20:10:54 +02:00
Jeremy Allison
d237022f91 void functions can't return a value. Found by the Solaris compiler.
Jeremy.
2009-09-17 10:04:19 -07:00
Jeremy Allison
9e5488d399 void functions can't return a value. Found by the Solaris compiler.
Jeremy.
2009-09-17 10:03:14 -07:00
Jeremy Allison
2032f2653e void functions can't return a value. Found by the Solaris compiler.
Jeremy.
2009-09-17 10:00:31 -07:00
Jeremy Allison
16836f9e9e We now pass the Microsoft SMB2 fileio test with EA's and streams...
Jeremy.
2009-09-17 09:29:07 -07:00
Matt Kraai
f6a29f7dd3 Port the Samba 3 shm_setup to QNX. 2009-09-13 12:55:26 +02:00
Günther Deschner
99c3fc1958 s3-winbindd: add and use winbindd_lookup_names().
Guenther
2009-09-17 08:54:31 +02:00
Günther Deschner
f0b52b8c31 s3-winbindd: add and use winbindd_lookup_sids().
Guenther
2009-09-17 08:54:19 +02:00
Kamen Mazdrashki
35f4b88c7c w32err: use WERR_DC_NOT_FOUND name instead of WERR_DOMAIN_CONTROLLER_NOT_FOUND
Signed-off-by: Günther Deschner <gd@samba.org>
2009-09-17 07:18:51 +02:00
Abhidnya Chirmule
277597de85 To set file create/birth time in GPFS. Signed-off-by: Abhidnya Chirmule <achirmul@in.ibm.com> 2009-09-17 02:24:13 +02:00
Volker Lendecke
919559573c s3:vfs: Fix the build of vfs_tsmsm after the VFS rewrite 2009-09-17 02:07:11 +02:00
Günther Deschner
503d035814 spnego: share spnego_parse.
Guenther
2009-09-17 01:12:20 +02:00
Günther Deschner
44e44310d1 s3-netlogon: support validation level 6 in netr_SamLogon calls.
Guenther
2009-09-16 18:00:03 +02:00
Günther Deschner
5ddde4e19d s3-netlogon: match all logon levels in netr_SamLogon calls.
Guenther
2009-09-16 17:59:56 +02:00
Günther Deschner
42e393af28 s3-rpcclient: fix netr_LogonGetCapabilities command.
Guenther
2009-09-16 17:59:38 +02:00
Stefan Metzmacher
033ced60ac libcli/auth: rewrite schannel sign/seal code to be more generic
This prepares support for HMAC-SHA256/AES.

metze
2009-09-16 12:29:06 +02:00
Günther Deschner
a0d8698f65 s3-netapi: Fix Coverity #668: FORWARD_NULL.
Guenther
2009-09-16 10:30:08 +02:00
Günther Deschner
de43e39487 s3-netapi: Fix Coverity #669 FORWARD_NULL.
Guenthe
2009-09-16 10:30:01 +02:00
Günther Deschner
828b9a48fd s3-netapi: Fix Coverity #670: FORWARD_NULL.
Guenther
2009-09-16 10:29:54 +02:00
Günther Deschner
537ac20a92 s3-eventlogadm: Fix Coverity #938: UNINIT.
Guenther
2009-09-16 10:29:43 +02:00
Günther Deschner
6dab835fbb s3-rpcclient: Fix Coverity #935: UNINIT.
Guenther
2009-09-16 10:29:35 +02:00
Günther Deschner
37bc806453 s3-dcerpc: remove more obsolete or duplicate headers.
Guenther
2009-09-16 08:55:51 +02:00
Günther Deschner
c5c04fcf90 s3-schannel: add dump_NL_AUTH_SIGNATURE.
Guenther
2009-09-16 07:54:02 +02:00
Volker Lendecke
444a05c28d s3: Fix reading beyond the end of a named stream in xattr_streams
This was found thanks to a test by Sivani from Microsoft against Samba at the
SDC plugfest
2009-09-16 03:42:36 +02:00
Volker Lendecke
00d7aad85a s3: Add some debugs to streams_xattr 2009-09-16 03:42:36 +02:00
Günther Deschner
97d7a524ab s3-schannel: remove unused schannel_decode/schannel_encode.
Guenther
2009-09-16 01:55:13 +02:00
Günther Deschner
799f8d7e13 schannel: fully share schannel sign/seal between s3 and 4.
Guenther
2009-09-16 01:55:06 +02:00
Günther Deschner
f8014d30e7 s3-schannel: fix blob length when pulling off a NL_AUTH_SIGNATURE in
cli_pipe_verify_schannel().

Guenther
2009-09-16 00:11:23 +02:00
Günther Deschner
87acb96fc3 lib/crypto: add aes encryption routines to main cryto lib.
Guenther
2009-09-16 00:11:23 +02:00
Björn Jacke
18f1f5b56b s3: ignore cups-config to tidy up library dependencies
contrary to krb5-config for example, which outputs useful things, cups-config
--libs does not output libs we have to link against. It outputs libs that cups
linked against. We just have to link against cups.
2009-09-15 19:48:32 +02:00
Andrew Bartlett
5a01071692 libcli:nbt put util_net.c protos in new header file
This fixed a very odd build problem due to util.h importing
system/network.h being imported before the uid_wapper code.

Andrew Bartlett
2009-09-15 10:38:53 -07:00
Günther Deschner
231b2fa261 s3-dcerpc: really fix remaining old auth level constants. sorry...
Guenther
2009-09-15 19:34:18 +02:00
Günther Deschner
c2d7c7a9dd s3-dcerpc: fix remaining old auth level constants.
Guenther
2009-09-15 18:30:44 +02:00
Günther Deschner
fdf3bd6203 s3-dcerpc: remove unsed auth type defines as seen on the wire.
Guenther
2009-09-15 17:50:00 +02:00
Günther Deschner
e1ecb807e3 s3-dcerpc: remove more unused structs.
Guenther
2009-09-15 17:49:52 +02:00
Günther Deschner
7b36ea55ea s3-dcerpc: remove duplicate RPC_AUTH_LEVEL flags.
Guenther
2009-09-15 17:49:43 +02:00
Günther Deschner
d3af0346c8 s3-dcerpc: use dcerpc_AuthLevel and remove duplicate set of flags.
Guenther
2009-09-15 17:49:34 +02:00
Andrew Bartlett
668470c992 libcli:nbt make the lmhosts parsing code and dependicies common
This starts the process to have Samba4 use lmhosts.

Andrew Bartlett
2009-09-15 07:42:54 -07:00
Björn Jacke
f410d23185 s3: BSD needs sys/sysctl.h included to build properly
FreeBSD (and other BSDs, too) need sys/sysctl.h inclueded to use sysctlbyname().

Thanks to Timur Bakeyev for that.
2009-09-15 06:54:31 +02:00
Volker Lendecke
24309bdb2e Second part of bug fix for 6606.
s3:libsmb: Fix bug 6606 -- short reads in smbclient were not handled
2009-09-14 19:09:54 -07:00
Jeremy Allison
ca2c93b9e5 Fix bug 6494 - Incorrect FileStatus returned in NT_CREATE_ANDX.
Lookup the EA and Stream status on CreateX.
Jeremy.
2009-09-14 15:30:05 -07:00
Jeremy Allison
f31138ecc7 Fix bug 6726 - Filename length overwrites oplock request field in cli_nt_create().
Jeremy.
2009-09-14 15:10:53 -07:00
Volker Lendecke
e94361e1e2 s3:vfs_catia: Make some fns static 2009-09-14 22:48:45 +02:00
Volker Lendecke
d3a6914e3b s3:vfs_catia: Use talloc_zero for simplification 2009-09-14 22:48:45 +02:00
Volker Lendecke
9dae2501f1 s3:vfs_modules: Fix Coverity ID 946: OVERRUN_STATIC
Tim, please check!
2009-09-14 22:48:45 +02:00
Volker Lendecke
0f65d33502 s3: Test short reads in the build farm 2009-09-14 07:13:22 +02:00
Volker Lendecke
1f34ffa0ca s3:libsmb: Fix bug 6606 -- short reads in smbclient were not handled 2009-09-14 07:13:22 +02:00
Günther Deschner
2f9adf04e4 s3-rpc_client: add rpccli_lsa_lookup_sids3 wrapper.
Guenther
2009-09-14 06:49:58 +02:00
Günther Deschner
ff968712ba s3-rpc_client: add rpccli_lsa_lookup_names4 wrapper.
Guenther
2009-09-14 06:49:58 +02:00
Günther Deschner
c3da2056ec s3-samr: Fix Coverity #934 UNINIT.
Guenther
2009-09-13 21:33:00 +02:00
Günther Deschner
15bbae5fd8 s3-netlogon: Fix Coverity #945 UNINIT.
Guenther
2009-09-13 21:32:48 +02:00
Günther Deschner
f9edee119c s3-nterr: print a NT_STATUS_RPC_PROTSEQ_NOT_SUPPORTED.
Guenther
2009-09-13 21:22:34 +02:00
Günther Deschner
07031464c4 s3-schannel: fix Coverity #950 OVERRUN_STATIC.
Guenther
2009-09-13 21:21:54 +02:00
Günther Deschner
f900e61cf8 s3-schannel: fix api_pipe_schannel_process(), was using incorrect buffer length.
Found by RPC-SCHANNEL torture test.

Guenther
2009-09-13 06:46:55 +02:00
Michael Adam
a1cf12e1f6 s3:dbwrap_ctdb: set dmaster in ctdb_transaction_store() also when updating an existing record
not only when creating a record.

This matches commit e9194a130327d6b05a8ab90bd976475b0e93b06d from ctdb-master.

Michael
2009-09-11 15:39:53 +02:00
Michael Adam
9741cb7638 talloc:mksyms: allow characters after closing functions parenthesis.
Michael
2009-09-11 15:39:53 +02:00
Michael Adam
ee1fe382d6 talloc:mksyms: allow double pointer return value of functions.
Michael
2009-09-11 15:39:52 +02:00
Michael Adam
50347d6ac0 s3:mksyms: fix spelling...
Michael
2009-09-11 15:39:52 +02:00
Günther Deschner
cbac8e4fa0 s3-rpcclient: add lookupsids3 command.
Guenther
2009-09-11 13:59:56 +02:00
Günther Deschner
1d4bf02993 lsa: fill in more unknowns in lsa_LookupSid calls.
Guenther
2009-09-11 13:59:56 +02:00
Günther Deschner
4e98f93775 s3-rpcclient: make netlogon credential setup also work for interdomain trusts.
Guenther
2009-09-11 09:59:05 +02:00
Günther Deschner
12c7025156 s3-rpcclient: avoid using lp_workgroup() unconditionally for crypto.
Guenther
2009-09-11 09:59:05 +02:00
Günther Deschner
bea8e5fa60 s3-rpc_client: add dcerpc_transport_t to cli_rpc_pipe_open_schannel().
Guenther
2009-09-11 09:59:04 +02:00
Günther Deschner
032e01e7c1 s3-rpc_client: add dcerpc_transport_t to cli_rpc_pipe_open_spnego_ntlmssp and cli_rpc_pipe_open_ntlmssp.
Guenther
2009-09-11 09:59:04 +02:00
Günther Deschner
12acf6ca72 s3-rpcclient: use cli_rpc_pipe_open_noauth_transport in rpcclient.
Guenther
2009-09-11 09:59:04 +02:00
Günther Deschner
87f61a144b s3-rpc_client: add cli_rpc_pipe_open_noauth_transport.
Guenther
2009-09-11 09:59:03 +02:00
Günther Deschner
c4f6fb0b2d s3-schannel: remove last schannel hand-marshalling function.
Guenther
2009-09-11 03:00:43 +02:00
Günther Deschner
d258fb4d0d s3-schannel: use NL_AUTH_SIGNATURE for schannel sign & seal (client & server).
Guenther
2009-09-11 03:00:35 +02:00
Günther Deschner
cac5e64c00 s3-errors: add NT_STATUS_RPC_NT_PROCNUM_OUT_OF_RANGE.
Guenther
2009-09-11 02:58:34 +02:00
Günther Deschner
a155f3f9a9 s3-schannel: remove unused code.
Guenther
2009-09-11 02:57:35 +02:00
Günther Deschner
9ab5d9be8d s3-schannel: use NL_AUTH_MESSAGE for schannel bind reply.
Guenther
2009-09-11 02:57:27 +02:00
Günther Deschner
38ab500b78 s3-nterr: add NT_STATUS_RPC_NT_PROTOCOL_ERROR to nt_errstr().
Guenther
2009-09-11 02:57:07 +02:00
Günther Deschner
3c70480f3b s3-util: add get/set_cmdline_auth_info_domain to user_auth_info struct.
Guenther
2009-09-11 00:36:59 +02:00
Günther Deschner
8bd730f5ad s3-rpcclient: add lookupnames4 command.
Guenther
2009-09-11 00:26:24 +02:00
Günther Deschner
c17789fa1c s3-rpcclient: add ncacn transport handling for rpcclient.
Guenther
2009-09-11 00:26:24 +02:00
Günther Deschner
393a1f594d s3-rpc_client: add enum dcerpc_transport_t to rpc_cli_transport struct.
Guenther
2009-09-11 00:26:24 +02:00
Marc Aurele La France
7c00227f00 Fix bug 6707 - 3.4.1 segfault in parsing configs.
Fixes an occasional segfault caused by an out-of-bounds reference in config file parsing.
2009-09-10 09:52:11 -07:00
Jeremy Allison
f20c2e0fd4 Fix compile in a usually non-selected define.
Jeremy.
2009-09-09 13:54:47 -07:00
Volker Lendecke
a5cace128d s3:smbd: Add a "hidden" parameter "share:fake_fscaps"
This is needed to support some special app I've just come across where I had to
set the SPARSE_FILES bit (0x40) to make it work against Samba at all. There
might be others to fake. This is definitely a "Don't touch if you don't know
what you're doing" thing, so I decided to make this an undocumented parametric
parameter.

I know this sucks, so feel free to beat me up on this. But I don't think it
will hurt.
2009-09-09 22:03:22 +02:00
Günther Deschner
32c28e4f64 s3-winbindd: Fix Bug #6700: Use dns domain name when needing to guess server principal.
Patch from Robert LeBlanc <robert@leblancnet.us>.

Thanks!

Guenther
2009-09-09 02:29:58 +02:00
Günther Deschner
5f2ec4b202 s3-nterr: add NT_STATUS_RPC_NT_CALL_FAILED.
Guenther
2009-09-08 23:21:14 +02:00
Andrew Klosterman
f78f92acfe s3:smbd: Fix bug 6690, wrong error check 2009-09-08 17:39:51 +02:00
Günther Deschner
a48f884f70 s3: remove unused RPC_AUTH_SCHANNEL_NEG struct and parsing functions.
Guenther
2009-09-08 17:07:03 +02:00
Günther Deschner
3984738646 s3-rpc_server: use NL_AUTH_MESSAGE in pipe_schannel_auth_bind().
Guenther
2009-09-08 17:07:03 +02:00
Günther Deschner
de0bf36493 s3-rpc_client: use NL_AUTH_MESSAGE in create_schannel_auth_rpc_bind_req().
Guenther
2009-09-08 17:07:02 +02:00
Günther Deschner
4fd9a9d6de schannel: add NL_AUTH_MESSAGE and both NL_AUTH_SIGNATURE structs.
These actually belong netlogon but we for now want to keep netlogon as a security
providor separate.

Guenther
2009-09-08 14:55:10 +02:00
Günther Deschner
5b2b5abf4f s3-schannel: Fix Bug #6697. Interdomain trusts with Windows 2008 R2 DCs.
The Schannel verifier (aka NL_AUTH_SIGNATURE) structure (32 byte) sent from a
W2k8r2 DC is passed in a buffer with the size of a NL_AUTH_SHA2_SIGNATURE (56
byte). We should just ignore the remaining 12 zeroed bytes and proceed.

Guenther
2009-09-08 12:34:10 +02:00
Jeremy Allison
5ce12a0565 Add read() to socketwrapper. Metze please check.
Jeremy.
2009-09-07 20:31:01 -07:00
Jeremy Allison
43c766a14a Fix bug 6673 - smbpasswd does not work with "unix password sync = yes".
Revert change from 3.3 -> 3.4 with read_socket_with_timeout changed
from sys_read() to sys_recv(). read_socket_with_timeout() is called
with non-fd's (with a pty in chgpasswd.c and with a disk file in
lib/dbwrap_file.c via read_data()). recv works for the disk file,
but not the pty. Change the name of read_socket_with_timeout() to
read_fd_with_timeout() to make this clear (and add comments).
Jeremy.
2009-09-06 21:38:50 -07:00
Volker Lendecke
04ea250aeb s3:winbind: Convert WINBINDD_SET_HWM to the new API 2009-09-07 01:28:32 +02:00
Volker Lendecke
4ad330d522 s3:winbind: Convert WINBINDD_REMOVE_MAPPING to the new API 2009-09-07 01:28:32 +02:00
Volker Lendecke
7159060450 s3:winbind: Convert WINBINDD_SET_MAPPING to the new API 2009-09-07 01:28:32 +02:00
Volker Lendecke
d9b7fd59b0 s3:winbind: Convert WINBINDD_CHECK_MACHACC to the new API 2009-09-07 01:28:32 +02:00
Volker Lendecke
99f8dcab0c s3:smbd: Add the ntstatus to the smb_panic in share_mode_lock_destructor
This might help finding why bug 6518 happens
2009-09-07 01:28:32 +02:00
Rusty Russell
e6cb98e53a Tell newbie devs about ./configure.developer
Enhances the outputs in autogen.sh for both s3 and s4.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-09-06 12:01:05 +02:00
Simo Sorce
affed02ef6 Check we read off the compelte event from inotify
The kernel may return a short read, so we must use read_data() to make sure we
read off the full buffer. If somethign bad happens we also need to kill the
inotify watch because the filedescriptor will return out of sync structures if
we read only part of the data.
2009-09-05 12:49:26 -04:00
Simo Sorce
bc081cf0cc Save and report the correct errno value. 2009-09-05 12:49:26 -04:00
Volker Lendecke
0cfc2f19ef s3:winbind: Use fstr_sprintf, it is simpler than talloc_asprintf->fstrcpy 2009-09-05 17:14:45 +02:00
Volker Lendecke
c52fa95b95 s3:winbind: Remove pointless <cond> ? true : false; 2009-09-05 17:05:30 +02:00
Volker Lendecke
1abf692312 s3:winbind: Make the pam_auth subfunctions static 2009-09-05 17:00:21 +02:00
Volker Lendecke
4b49a8debc s3:libsmb: Convert (state->received) to (state->received != 0)
This confused me for a second, this should not happen a second time :-)
2009-09-05 12:52:48 +02:00
Volker Lendecke
5121499816 s3:winbind: Fix Coverity ID 933: FORWARD_NULL 2009-09-04 07:59:56 +02:00
Volker Lendecke
b4a4186556 s3:smbd: Fix Coverity ID 937, REVERSE_INULL 2009-09-04 07:57:26 +02:00
Volker Lendecke
360436b656 s3:winbind: Fix Coverity ID 940: Resource Leak 2009-09-04 07:53:56 +02:00
Günther Deschner
d9bdf2a02f s3-ntlm_auth: fix two segfaults in diagnostics mode.
Guenther
2009-09-04 00:04:40 +02:00
Jeremy Allison
bdc7bdb0d3 Hopefully last part of the fix for bug 6651 - smbd SIGSEGV when breaking oplocks.
This one is subtle. There is a race condition where a signal can be
queued for oplock break, and then the file can be closed by the client
before the signal can be processed. Currently if this occurs we panic
(we can't match an incoming signal fd with a fsp pointer). Simply log
the error (at debug level 10 right now, might be too much) and then
return without processing the break request. It looks like there is
another race condition with this fix, but here's why it won't happen.
If the signal was pending (caused by a kernel oplock break from a
local file open), and the client closed the file and then re-opened
another file which happened to use the same file descriptor as the
file just closed, then theoretically the oplock break requests could
be processed on the wrong fd. Here's why this should be very rare..
Processing a pending signal always take precedence over an incoming
network request, so as long as the client close request is non-chained
then the break signal should always be harmlessly processed *before*
the open can be called. If the open is chained onto the close, and
the fd on the new open is the same as the old closed fd, then it's
possible this race will occur. However, all that will happen is that
we'll lose the oplock on this file. A shame, but not a fatal event.
Jeremy.
2009-09-03 07:40:48 -07:00
Volker Lendecke
5c54e4c103 s3:libsmb: Attempt to fix bug 6665
Before the async libsmb rewrites, we sent tid==0 on negprot. With the rewrite,
we send 0xffff. This *should* not matter, but this is one difference in the
sniffs I see.
2009-09-03 09:23:57 +02:00
Günther Deschner
5268783e5c s3-net: allow to exit "net rpc sh" with "q" as well.
Guenther
2009-09-02 23:19:20 +02:00
Günther Deschner
a0b1968167 s3-netlogon: use WERRORs in NETLOGON_INFO structures.
Guenther
2009-09-02 15:29:44 +02:00
Matt Kraai
6657598168 Do not redefine strupr
Signed-off-by: Günther Deschner <gd@samba.org>
2009-09-02 13:02:39 +02:00
Günther Deschner
f092d689c5 s3-pdb_ldap: Fix bug #4296: Clean up group membership while deleting a user.
Note that this only is tried with editposix=yes.

Guenther
2009-09-02 12:40:47 +02:00
Günther Deschner
2b8afd2257 s3-netlogon: implement _netr_ServerPasswordSet2.
Guenther
2009-09-02 10:47:36 +02:00
Günther Deschner
71e9dfc0cd s3-netlogon: rework _netr_ServerPasswordSet.
Guenther
2009-09-02 10:47:35 +02:00
Günther Deschner
931771138a s3-netlogon: implement _netr_LogonSamLogonWithFlags().
Guenther
2009-09-02 10:23:28 +02:00
Simo Sorce
aec03eda93 s3-smbpasswd: Fix Bug #6584: allow DOM\user when changing passwords remotely.
Signed-off-by: Günther Deschner <gd@samba.org>
2009-09-02 10:17:14 +02:00
Simo Sorce
a28b499e80 s3: Fix libtalloc so version 2009-08-30 13:54:42 -04:00
Volker Lendecke
4179270198 s3:winbind: Fix bug 5626
Apparently the AIX compiler can't deal with sizeless array declarations
2009-08-30 11:13:18 +02:00
Volker Lendecke
0cae043b0c w3:winbind: Convert WINBINDD_ALLOCATE_GID to the new API 2009-08-30 09:48:28 +02:00
Volker Lendecke
9e7c6f12fd w3:winbind: Convert WINBINDD_ALLOCATE_UID to the new API 2009-08-30 09:48:28 +02:00
Volker Lendecke
2774a02f64 s3:winbind: Convert WINBINDD_LIST_GROUPS to the new API 2009-08-29 19:53:46 +02:00
Volker Lendecke
6b474c56a5 s3:winbind: Convert WINBINDD_LIST_USERS to the new API 2009-08-29 19:53:29 +02:00
Volker Lendecke
a95955f285 s3:nsstest: Fix a very confusing behaviour in nsstest
Testing getgrent I thought I get the offset calculations wrong whereas
it was only nsstest printing stuff with spaces...
2009-08-29 19:43:33 +02:00
Volker Lendecke
129562206a s3:winbind: add a fake NDR winbind cache validator 2009-08-29 19:42:27 +02:00
Volker Lendecke
e47491e83c s3:winbind: Convert the getgrent functions to the new API 2009-08-29 19:42:27 +02:00
Volker Lendecke
e71714830e s3:winbind: Add a comment about fill_grent_mem_domusers... 2009-08-29 19:42:27 +02:00
Volker Lendecke
9b5ad55de1 s3:winbind: Add some missing error checks 2009-08-29 19:42:27 +02:00
Volker Lendecke
8b9085472d s3:winbind: Fix a typo 2009-08-29 19:42:27 +02:00
Volker Lendecke
10e9df2975 s3:winbind: Add async wb_next_grent 2009-08-29 19:42:27 +02:00
Volker Lendecke
2555c12bce s3:winbind: Add async QueryGroupList 2009-08-29 19:42:27 +02:00
Volker Lendecke
50d9fb42fc w3:winbind: Convert WINBINDD_LOOKUPRIDS to the new API 2009-08-29 19:42:26 +02:00
Volker Lendecke
425239caee s3:winbind: Convert the GETDCNAME routines to the new API 2009-08-29 19:42:26 +02:00
Volker Lendecke
15312e7310 s3:winbind: Add async wb_dsgetdcname 2009-08-29 19:42:26 +02:00
Volker Lendecke
244bb7f163 s3:winbind: Convert winbindd_dsgetdcname to the new API 2009-08-29 19:42:26 +02:00
Volker Lendecke
7579f0fb17 s3:winbind: Add an async dsgetdcname call 2009-08-29 19:42:26 +02:00
Volker Lendecke
9c30a8dc6f s3:winbind: Convert the GETPWENT routines to the new API 2009-08-29 19:42:26 +02:00
Volker Lendecke
6e2bf7e234 s3:winbind: Add async next_pwent 2009-08-29 19:42:26 +02:00
Volker Lendecke
91588e6e8f s3:winbind: Add async fill_pwent 2009-08-29 19:42:26 +02:00
Volker Lendecke
c325ba89cf s3:winbind: Add async query_user_list 2009-08-29 19:42:26 +02:00
Volker Lendecke
9ef2c70963 s3:winbind: simplify wb_seqnums_done a bit 2009-08-29 19:42:26 +02:00
Volker Lendecke
ae6a6690d5 s3:winbind: Make wb_seqnums.c update the winbind cache seqnums 2009-08-29 19:42:25 +02:00
Volker Lendecke
99cf696150 s3:winbind: Fix a bug found by RPC-SAMR
We need to enumerate passdb alias members

Thanks to gd for bugging me :-)
2009-08-29 10:44:13 +02:00
Volker Lendecke
ccc18d4d5d s3:winbind: Fix a typo 2009-08-29 10:44:13 +02:00
Volker Lendecke
58feaa7947 s3:winbind: Rename wbint_GroupMembers to wbint_Principals 2009-08-29 10:44:13 +02:00
Volker Lendecke
ffd9d41be9 s3:winbind: Rename wbint_GroupMember to wbint_Principal 2009-08-29 10:44:12 +02:00
Aravind Srinivasan
c1b8eb884b s3: Add catia to the list of modules compiled by default
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-08-28 16:38:57 -07:00
Aravind Srinivasan
ad88284038 s3: Major revamp for catia vfs module
This patch builds out catia to allow fully configurable mappings,
including mappings from single byte to multi-byte characters.
Additionally, a much more complete list of vfs operations are now
covered.

Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-08-28 16:38:57 -07:00
Aravind Srinivasan
e046b382f2 s3: Add a new VFS op called SMB_VFS_TRANSLATE_NAME
This vop is designed to work in tandem with SMB_VFS_READDIR to allow
vfs modules to make modifications to arbitrary filenames before
they're consumed by callers.  Subsequently the core directory
enumeration code in smbd is now changed to free the memory that may be
allocated in a module.  This vop enables the new version of catia in
the following patch.

Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-08-28 16:38:57 -07:00
Michael Adam
9f1c162e33 s3-ldb: update dlinklist.h to match main copy (lib/util/dlinklist.h)
This also removes build warnings of redefined macros
since it uses the embracing "#ifndef _DLINKLIST_H ... #endif".

Michael
2009-08-28 14:25:40 +02:00
Günther Deschner
9afd44d03c s3-ntlmssp: use generated ntlmssp code for debugging purpose.
Guenther
2009-08-28 13:03:17 +02:00
Günther Deschner
91df77d2cf s3-ntlmssp: add NDR helper routines for ntlmssp.
Guenther
2009-08-28 13:03:05 +02:00
Günther Deschner
82469deeac s3-ntlmssp: use interface constants in TargetInfo blob.
Guenther
2009-08-28 10:08:59 +02:00
Günther Deschner
25d6c0a518 s3-ntlmssp: use NTLMSSP headers from IDL and remove duplicate constants.
Guenther
2009-08-28 10:08:52 +02:00
Stefan Metzmacher
2a3270beec s3:smbd: teach filename_convert() about fake files (2nd fix for bug #6642)
metze
2009-08-27 16:45:41 +02:00
Stefan Metzmacher
5234d10c8e s3:smbd: add is_fake_file_path() that takes only the raw path as string
metze
2009-08-27 16:45:40 +02:00
Stefan Metzmacher
09fe57923a s3:streams: check for :$DATA only in the backend (fix bug #6642)
We need to allow "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION" to pass
check_path(), so that the Quota Dialog works.

metze
2009-08-27 16:45:40 +02:00
Stefan Metzmacher
e91d5dbed0 s3:error_map: make NTSTATUS -> errno -> NTSTATUS mapping consistent for NT_STATUS_INVALID_PARAMETER
Why have we mapped EINVAL -> NT_STATUS_INVALID_HANDLE before?

metze
2009-08-27 16:45:39 +02:00
Günther Deschner
1f3d0c5485 s3-ntlmssp: remove trailing whitespace.
Guenther
2009-08-27 16:06:37 +02:00
Günther Deschner
360868b6e8 s3-schannel: remove remaining code that was using "struct dcinfo".
Guenther
2009-08-27 15:55:20 +02:00
Günther Deschner
a3c6e02748 s3-credentials: remove unused code.
Guenther
2009-08-27 15:55:20 +02:00
Günther Deschner
b089506136 s3-schannel: upgrade old format schannel_store.tdb.
Guenther
2009-08-27 15:55:20 +02:00
Günther Deschner
21a93c2ddc s3-netlogon: use shared credential and schannel storage infrastructure for netlogon server.
Guenther
2009-08-27 15:55:19 +02:00
Günther Deschner
2d8157fb9e s3-netlogon: add netr_creds_server_step_check() convenience wrapper.
Guenther
2009-08-27 15:55:19 +02:00
Günther Deschner
a09b627ecc s3-schannel: add simple wrappers to fetch and store schannel auth info.
Guenther
2009-08-27 15:55:19 +02:00
Günther Deschner
7c972d83d2 s3-schannel: make open_schannel_session_store() public.
Guenther
2009-08-27 15:55:19 +02:00
Günther Deschner
04310cc1c5 libcli/auth: add tdb backend for schannel state.
Guenther
2009-08-27 15:55:19 +02:00
Günther Deschner
5981272598 s3-build: add SCHANNEL_OBJ to Makefile.in.
Guenther
2009-08-27 15:55:18 +02:00
Volker Lendecke
1d8d3fd7c3 s3:winbind: Convert WINBINDD_GETUSERSIDS to the new API 2009-08-27 15:04:09 +02:00
Volker Lendecke
5a1240deac s3:winbind: Fix a typo 2009-08-27 15:04:09 +02:00
Volker Lendecke
c4a95f900a s3:winbind: Remove the manual caching for the async wb_ functions
The generic NDR-based cache in winbindd_dual_ndr.c replaces this.
2009-08-27 15:04:09 +02:00
Volker Lendecke
94948f7a40 s3:winbind: Some calls are not cacheable 2009-08-27 15:04:09 +02:00
Volker Lendecke
2f16bf5445 s3:winbind: Factor out wcache_store_seqnum() 2009-08-27 15:04:09 +02:00
Volker Lendecke
f3d71d3e8c s3:winbind: Add a generic cache for NDR based parent-child requests 2009-08-27 15:04:09 +02:00