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

666 Commits

Author SHA1 Message Date
Günther Deschner
2ecd50116c librpc: remove nbt dependency to samr.
Guenther
2011-11-03 18:35:08 +01:00
Stefan Metzmacher
22344f3e03 libcli/smb: use the same values for SMB_SIGNING_* as the source3 code uses
The source3 code currently uses:
 #define Undefined (-1)
 #define False false
 #define True true
 #define Required (3)

In order to make the rewrite easier we should match the values.

metze
2011-11-03 16:55:12 +01:00
Stefan Metzmacher
812c3dc80a libcli/smb: remove unused SMB_SIGNING_SUPPORTED
metze
2011-11-03 16:55:12 +01:00
Stefan Metzmacher
a4ac06a4be libcli/smb: add SMB_SIGNING_IF_REQUIRED as replacement for SMB_SIGNING_SUPPORTED
metze
2011-11-03 16:55:12 +01:00
Stefan Metzmacher
feace943d5 libcli/smb: SMB_SIGNING_AUTO is no longer used
metze
2011-11-03 16:55:12 +01:00
Stefan Metzmacher
18205ac7ad libcli/smb: add SMB_SIGNING_DEFAULT
metze
2011-11-03 16:55:11 +01:00
Stefan Metzmacher
5f520e7717 libcli/smb: add smb_buffer_oob() helper
A copy of trans_oob().

metze
2011-10-26 15:33:30 +02:00
Stefan Metzmacher
0d9bd56afb libcli/smb: merge NEGOTIATE_SECURITY_* flags to smb_constants.h
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Oct 26 11:27:12 CEST 2011 on sn-devel-104
2011-10-26 11:27:12 +02:00
Stefan Metzmacher
1fa7300037 libcli/smb: move smb_signing.[ch] to the toplevel
metze
2011-10-25 01:47:21 +02:00
Stefan Metzmacher
d76758ab9f libcli/smb: remove unused includes from read_smb.h
metze
2011-10-25 00:24:07 +02:00
Stefan Metzmacher
f3c25bc6a5 libcli/smb: merge LOCKING_ANDX_* and OPLOCK_* defines to smb_constants.h
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Oct 24 17:46:47 CEST 2011 on sn-devel-104
2011-10-24 17:46:47 +02:00
Stefan Metzmacher
ec7cc700b2 libcli/smb: move more defines to smb_constants.h
metze
2011-10-24 16:10:36 +02:00
Stefan Metzmacher
6fef69562b libcli/smb: move CAP_* defines to smb_constants.h
metze
2011-10-24 16:10:36 +02:00
Andrew Bartlett
59e838a1c4 libcli/smb Move smb_seal.h include to files that use it.
This is required because at the moment, smb_seal.h includes references to gssapi structures
and this causes issues with header dependencies on subsystems that otherwise do not need
a gssapi dependency.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-24 13:56:52 +02:00
Stefan Metzmacher
7ebd4337ac libcli/smb: move source3/libsmb/read_smb.* to the toplevel
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Oct 24 10:18:06 CEST 2011 on sn-devel-104
2011-10-24 10:18:06 +02:00
Matthieu Patou
4d2d33ee09 libcli-cldap: avoid the case local == remote == NULL 2011-10-21 22:29:09 +02:00
Stefan Metzmacher
66530e9149 libcli/cldap: make sure the local and remote address family matches
metze

Signed-off-by: Matthieu Patou <mat@matws.net>
2011-10-21 22:29:09 +02:00
Günther Deschner
80741d98d8 libcli: remove unneeded com_err.h and fix the build here.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Oct 21 15:52:36 CEST 2011 on sn-devel-104
2011-10-21 15:52:36 +02:00
Stefan Metzmacher
75d146d3ed libcli/smb: move smb_seal.c to the toplevel
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Oct 21 10:22:39 CEST 2011 on sn-devel-104
2011-10-21 10:22:39 +02:00
Stefan Metzmacher
e03b312b12 libcli/smb: add smb_setlen_[nbt|tcp] macros
metze
2011-10-21 08:42:59 +02:00
Stefan Metzmacher
32938ce60d libcli/smb: move some common defines to smb_constants.h
metze
2011-10-21 08:42:59 +02:00
Amitay Isaacs
51855de633 werror: Added missing DNS error codes
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-10-20 05:53:05 +02:00
Stefan Metzmacher
cd22763440 libcli/smb: add smb_[set]len_[nbt|tcp]() macros
metze
2011-10-19 15:44:29 +02:00
David Disseldorp
b711de287f libcli: Move smb2 fsctl fn defs into common code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-19 15:44:29 +02:00
David Disseldorp
d5ea379428 s3: Remove duplicate fsctl function definitions
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-19 15:44:29 +02:00
David Disseldorp
281fc93c6b libcli: move ioctl function field defs to smb_constants
Currently there are a lot of duplicate ioctl function field definitions
between source3 and source4.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-19 15:44:29 +02:00
Andrew Bartlett
0c6e4adcb2 ntlmssp: Move ntlmssp code to auth/ntlmssp
This brings in the code from both libcli/auth and
source4/auth/ntlmssp.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-18 13:13:31 +11:00
Andrew Bartlett
01c934c81e lib/util: Add back control of mmap and hash size in tdb for top level build
This passes down a struct loadparm_context to allow these
parameters to be checked.  This may be s3 or s4 context, allowing the
#if _SAMBA_BUILD_ macro to go away safely.

Andrew Bartlett
2011-10-13 14:06:07 +02:00
Andrew Bartlett
5603dab647 libcli/auth: Provide a struct loadparm_context to schannel calls
This will allow us to pass this down to the tdb_wrap layer.

Andrew Bartlett
2011-10-13 14:06:07 +02:00
Andrew Bartlett
26de383c42 libcli/smb Move CSC_POLICY_* definition to smb_constants.h
This removes the duplicate definition between smb.h and lib/param/loadparm.c
which in turn allows this file to be compiled with the s3 includes.h

Andrew Bartlett
2011-10-11 13:41:34 +11:00
Andrew Bartlett
b21b012756 lib/param move source4 param code to the top level
This is done so that the lpcfg_ functions are available across the whole
build, either with the struct loadparm_context loaded from an smb.conf directly
or as a wrapper around the source3 param code.

This is not the final, merged loadparm, but simply one step to make
it easier to solve other problems while we make our slow progress
on this difficult problem.

Andrew Bartlett
2011-10-11 13:41:34 +11:00
Stefan Metzmacher
b787b6e1bd libcli/cldap: don't pass tevent_context to cldap_socket_init()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Oct 10 23:23:07 CEST 2011 on sn-devel-104
2011-10-10 23:23:07 +02:00
Stefan Metzmacher
af24591a20 libcli/cldap: make use of explicit tevent_contexts
metze
2011-10-10 21:50:26 +02:00
Stefan Metzmacher
5a7a1b35be libcli/cldap: pass tevent_context to cldap_search_send()
metze
2011-10-10 21:50:26 +02:00
Stefan Metzmacher
2cd76b0931 libcli/cldap: pass tevent_context to cldap_netlogon_send()
metze
2011-10-10 21:50:26 +02:00
Stefan Metzmacher
3ed85d7c69 libcli/cldap: pass tevent_context to cldap_set_incoming_handler()
metze
2011-10-10 21:50:26 +02:00
Andrew Bartlett
36b2227eca ldb: use ldb directly rather than via a copy
This avoids needing to manually sync the two files, which due to the
top level build must be API compatible at all times anyway.

The most important recent change was:

commit e3b76bd620
Author: Andrew Tridgell <tridge@samba.org>
Date:   Thu Jul 28 15:51:31 2011 +1000

    ldb: fixed a search expression parse bug

However, as we always control the search expression in the callers to
this code, no backport to other releases is required.

Andrew Bartlett
2011-10-07 17:45:20 +11:00
Andrew Bartlett
055f017b36 build: Reduce build systems to just top level waf and autoconf
The s3-waf build system is a key component of the top level build, but
with this commit is is no longer available directly.  This reduces the
number of build system combinations in master as we prepare for the
Samba 4.0 release.

Andrew Bartlett
2011-10-07 17:42:03 +11:00
Jelmer Vernooij
3358239a57 smb_unix_ext.h: Protect against multiple inclusion. 2011-09-28 12:05:54 +02:00
Jelmer Vernooij
2660a465c3 Install headers included by smb_common.h. 2011-09-28 11:32:36 +02:00
Kai Blin
df88e66250 errormap: Add unix_to_werror() function
While this function technically is closest to the
map_nt_status_from_unix() function, I think it is better to keep the new
function in line with our usual fooerror_to_barerror() naming scheme.

Signed-off-by: Kai Blin <kai@samba.org>
2011-09-28 02:02:35 +02:00
Kai Blin
8eb80a9d83 libcli/smb: Get rid of set but unused variable 2011-09-24 21:46:05 -07:00
Jeremy Allison
e99a18cdc0 Remove extraneous debug code.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Sep 22 00:22:12 CEST 2011 on sn-devel-104
2011-09-22 00:22:12 +02:00
Jeremy Allison
d89bbe9b0a Fix bug #8474 - SMB2 create doesn't cope with an Apple client using NULL blob in create
Cope with zero length data_offset and data_length values.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Sep 21 22:12:40 CEST 2011 on sn-devel-104
2011-09-21 22:12:40 +02:00
Stefan Metzmacher
62d4a317f9 libcli/smb: add SMB2_DIALECT_REVISION_222
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Sep 16 19:51:47 CEST 2011 on sn-devel-104
2011-09-16 19:51:47 +02:00
Stefan Metzmacher
f6217aa7d1 libcli/smb: add PROTOCOL_SMB2_22
metze
2011-09-16 16:44:14 +02:00
Stefan Metzmacher
d727fcc867 libcli/auth: add some const to SMBNTencrypt_hash() and SMBNTencrypt()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Sep 14 19:49:24 CEST 2011 on sn-devel-104
2011-09-14 19:49:24 +02:00
Stefan Metzmacher
258ffddf1c libcli/smb: s/FLAGS2_UNKNOWN_BIT4/FLAGS2_SMB_SECURITY_SIGNATURES_REQUIRED
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Sep 10 00:34:50 CEST 2011 on sn-devel-104
2011-09-10 00:34:50 +02:00
Stefan Metzmacher
dd3c1b740c smb2_constants: add SMB2_WRITEFLAG_WRITE_THROUGH define
metze
2011-09-06 15:28:00 +02:00
Stefan Metzmacher
d7eb4a4c85 libcli/smb: add PROTOCOL_SMB2_10
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Sep  5 14:57:06 CEST 2011 on sn-devel-104
2011-09-05 14:57:06 +02:00
Stefan Metzmacher
7fd075f91b libcli/smb: remove PROTOCOL_SMB2 alias of PROTOCOL_SMB2_02
metze
2011-09-05 13:25:01 +02:00
Stefan Metzmacher
0ed0a66956 libcli/smb: move smb2_signing.c to the toplevel
metze
2011-09-05 13:17:32 +02:00
Stefan Metzmacher
480a031c5b smb2_constants: add SMB2_HDR_CREDIT_CHARGE
SMB2_HDR_EPOCH was never used and SMB 2.10 uses it as
SMB2_HDR_CREDIT_CHARGE.

We keep SMB2_HDR_EPOCH as alias for now, until all callers
are fixed.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Aug 30 23:49:56 CEST 2011 on sn-devel-104
2011-08-30 23:49:56 +02:00
Michael Adam
a3538b92d3 werror: remove duplicate definition of WERR_INVALID_OWNER
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Aug 26 01:23:52 CEST 2011 on sn-devel-104
2011-08-26 01:23:52 +02:00
Jelmer Vernooij
97afeaceda smb_common: Fix include paths.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Aug 18 16:54:01 CEST 2011 on sn-devel-104
2011-08-18 16:54:01 +02:00
Jelmer Vernooij
f0d15e8ffa smb_common: Install some more headers. 2011-08-18 13:43:42 +02:00
Volker Lendecke
fe66abd6ff Adapt del_sid_from_array to Samba coding style
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Aug 17 16:46:24 CEST 2011 on sn-devel-104
2011-08-17 16:46:24 +02:00
Volker Lendecke
e5a6d4cdb6 Fix a typo 2011-08-17 14:11:03 +02:00
Volker Lendecke
28b237b2cc Remove unused "sid_equal" 2011-08-17 12:30:08 +02:00
Volker Lendecke
8fd5e0ff2e Replace calls to sid_equal with calls to dom_sid_equal 2011-08-17 12:30:08 +02:00
Jelmer Vernooij
f8ec7f6cb1 pytalloc: Use consistent prefix for functions, add ABI file. 2011-08-10 15:36:21 +02:00
Andrew Bartlett
af5f494bd2 build: provide tevent-util as a public library
This is needed so that OpenChange can get at _tevent_req_nterr(), which is referenced
by generated PIDL output.

Andrew Bartlett
2011-08-08 13:34:06 +02:00
Andrew Bartlett
fec25c3a62 ntlmssp: Add ntlmssp_blob_matches_magic()
This avoids having the same check in 3 different parts of the code

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Aug  3 12:45:04 CEST 2011 on sn-devel-104
2011-08-03 12:45:04 +02:00
Andrew Bartlett
d3fe48ba48 gensec: Remove mem_ctx from calls that do not return memory
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03 18:48:01 +10:00
Jelmer Vernooij
23cbfef542 cli_smb_common: Lowercase name. 2011-07-26 13:31:08 +02:00
Jelmer Vernooij
08785dd73d cli_cldap: Lowercase name. 2011-07-26 13:31:08 +02:00
Stefan Metzmacher
82413e829e libcli/security: add some const to marshall_sec_desc[_buf]()
metze
2011-07-23 09:55:54 +02:00
Stefan Metzmacher
86fb61a4aa libcli/smb: add NBSS message types
metze
2011-07-12 09:44:04 +02:00
Stefan Metzmacher
cc2a5d23ae libcli/smb: add PROTOCOL_SMB2_02 constant
metze
2011-07-12 08:17:59 +02:00
Björn Baumbach
6db705d6fc libcli: remove duplicate of #define NT_STATUS_NO_SUCH_JOB
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Jul  7 20:29:13 CEST 2011 on sn-devel-104
2011-07-07 20:29:13 +02:00
Andrew Bartlett
7891848357 libcli/smb move FILE_TYPE constants in common
This allows us to remove another _SAMBA_BUILD_ conditional

Andrew Bartlett
2011-07-06 05:32:59 +02:00
Andrew Bartlett
6543987139 libcli/smb move enum protocol_types to a common header 2011-07-06 05:32:51 +02:00
Andrew Bartlett
8b99c2063a build: Add missing depencency on NDR_NBT 2011-07-05 12:41:05 +10:00
Volker Lendecke
61d0afeab3 s3: Add STATUS_STOPPED_ON_SYMLINK error code 2011-07-03 11:31:28 +02:00
Volker Lendecke
21b30d52f5 Add NT_STATUS_IO_REPARSE_TAG_NOT_HANDLED
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Jun 24 22:36:50 CEST 2011 on sn-devel-104
2011-06-24 22:36:50 +02:00
Volker Lendecke
61ad606016 Add NT_STATUS_IO_REPARSE_DATA_INVALID
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Jun 24 17:58:00 CEST 2011 on sn-devel-104
2011-06-24 17:58:00 +02:00
Andrew Bartlett
5db74b9607 lib/util Remove samba-util-common!
All of this code is now in common, so we don't need the second
'-common' library any more!

Andrew Bartlett
2011-06-21 09:36:22 +10:00
Volker Lendecke
f0ff6f390a Use tevent_req_oom
This fixes a few Coverity errors
2011-06-20 12:33:24 +02:00
Rusty Russell
58f7cda1bc tdb_compat: use tdb_errorstr_compat()
Since TDB2 functions return the error directly, tdb_errorstr() taken an
error code, not the tdb as it does in TDB1.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
0e4c358e27 tdb_compat.h: divert every tdb build and includes to tdb_compat
We change all the headers and wscript files to use tdb_compat; this
means we have one place to decide whether to use TDB1 or TDB2.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:34 +02:00
Andrew Bartlett
a1f04e8abc libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbol
The two error tables need to be combined, but for now seperate the names.

(As the common parts of the tree now use the _common function,
errmap_unix.c must be included in the s3 autoconf build).

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104
2011-06-20 08:12:03 +02:00
Andrew Bartlett
018f4a5889 libcli/util Bring samba4 unix -> nt_status code in common.
Due to library link orders, this is already the function that is being
used.  However we still need to sort out the duplicate symbol issues,
probably by renaming things.

Andrew Bartlett
2011-06-20 14:36:06 +10:00
Volker Lendecke
36e674c134 s3: Allow NULL sd_size in make_sec_desc
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Jun 18 22:26:15 CEST 2011 on sn-devel-104
2011-06-18 22:26:15 +02:00
Andrew Tridgell
b341979adb util: moved nt_errstr() into common code
this brings nt_errstr() into common code, using the new
talloc_stackframe_exists() to ensure that we only allocate an error
string using talloc_tos() if a talloc stackframe does currently
exists. This makes it safe to use in external libraries

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-06-17 17:08:59 +10:00
Andrew Bartlett
1233ba7bf3 libclu/util: Move get_friendly_nt_error_msg() in common.
Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-17 17:08:59 +10:00
Günther Deschner
faf73c72af libcli/smbreadline/smbreadline.h: fix licence/copyright
Guenther
2011-06-10 15:11:43 +02:00
Günther Deschner
a49c1b7019 libcli/security/secdesc.h: fix licence/copyright
Guenther
2011-06-10 15:11:40 +02:00
Günther Deschner
d41519f99e libcli/nbt/nbt_proto.h: fix licence/copyright
Guenther
2011-06-10 15:11:37 +02:00
Günther Deschner
218273841c libcli/ldap/ldap_ndr.h: fix licence/copyright
Guenther
2011-06-10 15:11:34 +02:00
Günther Deschner
f04b673aba libcli/auth/msrpc_parse.h: fix licence/copyright
Guenther
2011-06-10 15:11:30 +02:00
Andrew Bartlett
6bf88222cc libcli/util Remove prototype for ntstatus_dos_equal()
This was removed recently.
2011-06-06 15:02:38 +10:00
Andrew Tridgell
40dc94a53f s4-ipv6: update callers to load_interface_list() 2011-06-06 12:26:10 +10:00
Rusty Russell
c29069e079 libcli/cldap/cldap.c: don't hand huge values to tevent_timeval_add usecs
state->request.delay is two million here, resulting in an invalid timeval.
Since tevent doesn't have a convenient wrapper to add arbitrary usecs,
do the arithmetic here (it's the sole caller of this function).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-01 10:38:47 +02:00
Volker Lendecke
b9a727c5f1 Tiny simplification to dom_sid_string_buf
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue May 31 23:16:31 CEST 2011 on sn-devel-104
2011-05-31 23:16:31 +02:00
Andrew Bartlett
c004a932c4 libcli/util Remove ntstatus_check_dos_mapping
This has been set to true since the global loadparm was removed in
2008, and removes an #ifdef SAMBA_BUILD == 4

Andrew Bartlett
2011-05-31 15:10:20 +10:00
Andrew Bartlett
381423b1bd libcli/security: move secdesc.c to the top level libcli/security
This code does not rely on lp_ or other source3 only functions, so can
be part of the common library.

Andrew Bartlett
2011-05-31 00:32:07 +02:00
Andrew Bartlett
8d7be8af79 build: Make util_reg subsystem in libcli/registry a library 2011-05-18 16:12:08 +02:00
Andrew Bartlett
2fc342c20a waf-build: Add more libraries to avoid duplicate symbols
The new source of duplicates is calling libnetapi from inside smbtorture.

Andrew Bartlett
2011-05-18 16:12:07 +02:00
Günther Deschner
18d3b85c40 libcli/auth/krb5_wrap: correctly use discard_const().
Jeremy, please check.

Guenther
2011-05-13 00:11:41 +02:00
Michael Adam
cd1d75c7a4 libcli/auth/smbencrypt: in E_deshash, use talloc_stackframe instead of "#if _SAMBA_BUILD_ == 3" and talloc_tos()
talloc_stackframe() is used in other shared components already,
and if the stack is a talloc_pool, then in most cases, it should
also not be more expensive than directly using talloc_tos().

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu May 12 12:52:02 CEST 2011 on sn-devel-104
2011-05-12 12:52:02 +02:00
Michael Adam
75f289d30e libcli/auth: fix "no talloc stackframe around" message from the samba4.blackbox.kinit test
create_kerberos_key_from_string_direct() used talloc_tos() directly.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2011-05-10 21:59:38 +02:00
Andrew Bartlett
22cb631b4f s4-interfaces Rename interfaces code so not to conflict with source3/
The iface_count, iface_n_bcast, and load_interfaces functions
conflicted with functions of the same name in source3, so the source4
functions were renamed.  Hopefully we can actually wrap one around the
other in future.

Andrew Bartlett
2011-05-08 12:57:04 +02:00
Günther Deschner
03b9a9938b libcli/security: fix build warning, cr_descr_log_acl() is not used currently.
Guenther
2011-05-06 10:48:11 +02:00
Andrew Bartlett
e3b858496f libcli/smb Move cifs posix helper functions and headers in common
unix_perms_to_wire() was a duplicate symbol in the top level build.

Andrew Bartlett
2011-05-06 07:51:24 +02:00
Andrew Bartlett
cad704e836 errors: Remove unused unix_to_werror() 2011-05-06 07:51:24 +02:00
Andrew Bartlett
db74cad1c6 libcli/util Move NTSTATUS table to the top level 2011-05-06 07:51:24 +02:00
Andrew Bartlett
344eb08ee4 nterr: Add mem_ctx for return string from get_nt_error_c_code()
It is clearer to avoid the implicit return on talloc_tos()

Andrew Bartlett
2011-05-06 07:51:24 +02:00
Andrew Bartlett
f1ec28827f libcli/util Merge ntstatus_to_dos() ntstatus_to_werror() to the top level
This takes the Samba4 version, with the NT_STATUS_IS_DOS() check.
This will be used in smbd/error.c shortly.

Andrew Bartlett
2011-05-06 07:51:24 +02:00
Andrew Bartlett
1475013963 lib/util Move source3 tdb_wrap_open() into the common code.
This #if _SAMBA_BUILD == 3 is very unfortunate, as it means that in
the top level build, these options are not available for these
databases.  However, having two different tdb_wrap lists is a worse
fate, so this will do for now.

Andrew Bartlett
2011-05-06 07:51:24 +02:00
Jeremy Allison
7d6ebe0de7 More const fixes. Remove CONST_DISCARD. 2011-05-06 01:44:07 +02:00
Jeremy Allison
df023b8657 Tidy up some missing checks for NULL in strlcpy. 2011-05-04 12:12:15 -07:00
Jeremy Allison
017e0c8d95 Fix simple uses of safe_strcpy -> strlcpy. Easy ones where we just remove -1. 2011-05-04 12:12:13 -07:00
Andrew Bartlett
7261a9b9f7 s4-libcli Remove resolve_name() as it conflicts with Samba3.
This was just a wrapper around resolve_name_ex(), so just call that
instead.

Andrew Bartlett
2011-05-03 07:37:07 +02:00
Günther Deschner
89ceb48978 libcli/named_pipe_auth: add forward declaration in npa_tstream.h.
Guenther
2011-05-02 15:03:43 +02:00
Stefan Metzmacher
aae1f86952 libcli/util/ntstatus: NO_S4U_PROT_SUPPORT and CROSSREALM_DELEGATION_FAILURE
metze
2011-05-02 13:58:22 +02:00
Andrew Bartlett
f96793142d build: put doserr.c into it's own subsystem, so it's no longer a duplicate
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Apr 29 10:00:32 CEST 2011 on sn-devel-104
2011-04-29 10:00:32 +02:00
Andrew Bartlett
6021af4fd3 libcli/smb Move attrib_string in common 2011-04-29 16:38:14 +10:00
Andrew Bartlett
9f75b7cbb3 libcli/smb Move FILE_ATTRIBUTE defines to the top level 2011-04-29 16:38:12 +10:00
Andrew Bartlett
f0ce322c77 auth/kerberos Move all the PAC handling functions to auth/kerberos 2011-04-27 11:56:48 +10:00
Andrew Bartlett
6ec4306f8c auth/kerberos: Create common helper to get the verified PAC from GSSAPI
This only works for Heimdal and MIT Krb5 1.8, other versions will get
an ACCESS_DEINED error.

We no longer manually verify any details of the PAC in Samba for
GSSAPI logins, as we never had the information to do it properly, and
it is better to have the GSSAPI library handle it.

Andrew Bartlett
2011-04-27 11:56:48 +10:00
Andrew Bartlett
e04bab4a19 libcli/auth Move Samba4's gssapi_error_string from GENSEC to libcli/auth
This will allow the GSSAPI PAC fetch code to use it.

Andrew Bartlett
2011-04-27 11:21:37 +10:00
Andrew Bartlett
0840d5bb8b libcli/auth Allow parsing of a PAC that is already verified.
By making the verification parameters optional, we can parse a PAC
that is already verified.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Apr 26 10:06:59 CEST 2011 on sn-devel-104
2011-04-26 10:06:58 +02:00
Andrew Bartlett
c18954775e libcli/dns Improve dns_hosts_file, using Samba3's struct dns_rr_srv
By reworking the 'fake DNS' file to use struct dns_rr_srv it should be
possible to emulate that resolver layer as well as the Samba4
sockaddr_storage* based layer.  This will then give us a common DNS
emulation for 'make test'.

Andrew Bartlett
2011-04-26 17:16:34 +10:00
Jelmer Vernooij
93179239eb Add missing dependency on com_err.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Apr 23 16:53:03 CEST 2011 on sn-devel-104
2011-04-23 16:53:03 +02:00
Andrew Bartlett
f28f5db15a libcli/auth Move PAC parsing and verification in common.
This uses the source3 PAC code (originally from Samba4) with some
small changes to restore functionality needed by the torture tests,
and to have a common API.

Andrew Bartlett
2011-04-20 04:31:07 +02:00
Andrew Bartlett
0e5482c791 libcli/auth: Move more kerberos wrapping in common
These functions are required to get the krb5 PAC parsing and
verfication in common.

Andrew Bartlett
2011-04-20 04:31:07 +02:00
Andrew Bartlett
32c12cc279 libcli/auth Fix compile on hosts without krb5
Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr 14 11:08:49 CEST 2011 on sn-devel-104
2011-04-14 11:08:49 +02:00
Andrew Bartlett
4ba1375526 libcli/auth Move krb5 wrapper functions from s3 into common
This requires a small rework of the build system to ensure that the
correct #define statements are made in both the s3 and top level
builds.  We now define the various HAVE_ macros in config.h at all
times, using heimdal_build/wscript_configure when that is in use.

Andrew Bartlett
2011-04-14 16:38:26 +10:00
Andrew Bartlett
35fca85660 libcli/ldap Re-add ldap_ndr.h as a public header
as noticed by Brad Hards

Andrew Bartlett
2011-04-14 12:22:59 +10:00
Christian Ambach
96a49d23a4 libcli: allow exclusion of netbios name in NTLMV2 blob
when no hostname is given, leave away the MsvAvNbComputerName part
of the ntlmv2 blob

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-04-14 01:32:22 +02:00
Volker Lendecke
d4c693df98 Add dom_sid_parse_endp
This returns a pointer to the first non-parsed character, along the lines of
strtoul for example.

Signed-off-by: Jeremy Allison <jra@samba.org>
2011-04-13 14:13:24 -07:00
Volker Lendecke
111f4ec8b7 s3: Use talloc_tos() in the S3 build
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Apr 13 09:30:55 CEST 2011 on sn-devel-104
2011-04-13 09:30:55 +02:00
Andrew Bartlett
bf431fbedb libcli/auth Use convert_string_error to check LM hash calculation.
This allows us to know if the LM hash was built correctly or not.

NOTE: talloc_tos() is not available in the common code at this time.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-13 14:47:08 +10:00
Andrew Bartlett
5694ba507c libcli/ldap pull LIBCLI_LDAP_MESSAGE and LIBCLI_LDAP_NDR into a library
This reduces symbol duplication

Andrew Bartlett
2011-04-13 11:47:36 +10:00
Günther Deschner
9c6f78aae1 s3: add some forward declarations.
Guenther
2011-04-12 12:20:43 +02:00
Andrew Tridgell
5adf85e6af tstream: make npa_tstream a private library
this prevents symbol duplication of the npa_tstream symbols

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-04-06 08:12:19 +02:00
Andrew Tridgell
a8da13cd5c lib: make asn1_util a private library
this prevents symbol duplication of the asn1 symbols in the service
and ntvfs subsystems

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-04-06 08:12:19 +02:00
Andrew Bartlett
457c665be2 libcli/nbt Cope with blank lines in DNS hosts file 2011-04-06 12:34:57 +10:00
Andrew Bartlett
663dc94e63 auth: Move auth_session_info into IDL
This changes auth_session_info_transport to just be a wrapper, rather
than a copy that has to be kept in sync.

As auth_session_info was already wrapped in python, this required
changes to the existing pyauth wrapper and it's users.

Andrew Bartlett
2011-04-05 23:46:04 +02:00
Günther Deschner
0a250f4946 registry: create and use shared libcli/registry/util_reg.h header.
Guenther
2011-03-30 01:13:07 +02:00
Jeremy Allison
0c5214e2eb Ensure convert_string_XXX is always called with a valid converted_size pointer.
Preparation for cleaning up this API.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Mar 29 21:01:49 CEST 2011 on sn-devel-104
2011-03-29 21:01:49 +02:00
Jeremy Allison
52602e4f5a Fix inspired by work done by David Disseldorp for bug #8040 - smbclient segfaults when a Cyrillic netbios name or workgroup is configured.
Change msrpc_gen to return NTSTATUS and ensure everywhere this is
used it is correctly checked to return that status.

Jeremy.
2011-03-28 23:12:07 +02:00
Volker Lendecke
8db0374251 s3: Fix Coverity ID 682: NEGATIVE_RETURNS 2011-03-27 22:22:10 +02:00
Andrew Tridgell
5a20325c86 libcli: created smb_constants.h
this starts the (long!) process of moving some of the SMB constants
into common files. This just moves the FLAGS2_ defines, which are
needed for common string routines (for FLAGS2_UNICODE_STRINGS)
2011-03-25 04:37:06 +01:00
Andrew Tridgell
15e84a9a09 charcnv: removed the allow_badcharcnv and allow_bad_conv options to convert_string*()
we shouldn't accept bad multi-byte strings, it just hides problems

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
2011-03-24 01:47:26 +01:00
Stefan Metzmacher
4928d66fc2 libcli/security: make sure that we don't grant SEC_STD_DELETE to the owner by default
In the file server SEC_STD_DELETE is granted on the file/directory
or by FILE_DELETE_CHILD on the parent directory.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Mar 21 23:25:05 CET 2011 on sn-devel-104
2011-03-21 23:25:05 +01:00
Matthieu Patou
d772b8e780 ldapcli: allocate control value on the control object not on the control container 2011-03-20 11:27:25 +01:00
Jelmer Vernooij
fa387825e2 libcli/: Fix prototypes for all functions. 2011-03-19 03:20:05 +01:00
Günther Deschner
e1f84330ba libcli/security: move display_sec headers to own header file and add to
security.h grouping header.

Guenther
2011-03-16 10:11:08 +01:00
Andrew Tridgell
73e7b72936 libcli: openchange doesn't need these headers any more
thanks to Simo for pointing this out

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Mar 16 00:25:10 CET 2011 on sn-devel-104
2011-03-16 00:25:10 +01:00