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

5524 Commits

Author SHA1 Message Date
Andreas Schneider
fbd7626656 libsmbconf: Convert smbconf_delete_share() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-10 19:13:21 +02:00
Andreas Schneider
7f355e05f9 libsmbconf: Convert smbconf_get_share() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-10 19:13:21 +02:00
Andreas Schneider
7af2876e45 libsmbconf: Convert smbconf_create_share() to smbErr.
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-10 19:13:20 +02:00
Andreas Schneider
823cd472b4 libsmbconf: Convert smbconf_get_share_names() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-10 19:13:20 +02:00
Andreas Schneider
720ba8e7e7 libsmbconf: Convert smbconf_drop() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-10 19:13:20 +02:00
Andreas Schneider
9082c7cee8 libsmbconf: Convert smbconf_open() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-10 19:13:20 +02:00
Andreas Schneider
29eea4b09a libsmbconf: Convert smbconf_init() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-10 19:13:20 +02:00
Andrew Tridgell
628fcd111a s3-events: tevent_internal.h is not a public header
We need to use the "foo.h" form instead of the <foo.h> form for
headers that are not installed publicly. Otherwise when an external
version of tevent is used we won't find the header and the build will
fail.

Note that this creates a structure dependency between the
tevent structures in the external library and the headers in our
source tree. That is not ideal, but is currently OK as the waf build
will only use the external library if it is at least the same version
as the internal tree, which means it will actually be the same
version, as we release the external version from our tree.

We should come up with a better solution, but for now this allows
openchange to build again.

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue May 10 16:06:40 CEST 2011 on sn-devel-104
2011-05-10 16:06:40 +02:00
Rusty Russell
7deeacae2b gencache: don't use CLEAR_IF_FIRST as fallback.
CLEAR_IF_FIRST only works if *all* openers use that flag.

So just truncate the file: it's racy, but that's what we're doing anyway.

We'd really need a TDB_OPENCHECK_OR_CLEAR flag to do this properly (or in
TDB2, a open hook at the right point).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-04-19 12:06:05 +09:30
Andrew Bartlett
897ef820a4 s3-lib Use common lib/socket code for get_interfaces() et al 2011-05-08 12:57:04 +02:00
Andrew Bartlett
f946668b7a Improve debug messages when creating socket directories
This makes clear what the permissions error and directory name actually is

Andrew Bartlett
2011-05-08 10:56:28 +02:00
Günther Deschner
27022587e3 s3-libsmb: move protos to libsmb/proto.h
Guenther
2011-05-06 16:37:18 +02:00
Günther Deschner
d8cfca3a9b s3: only include tdb headers where needed.
Guenther
2011-05-06 10:48:10 +02:00
Andrew Bartlett
8f1810362d lib/util Use lib/util/ms_fnmatch.c in common for gen_fnmatch()
gen_fnmatch was a duplicate symbol in the top level build.

gen_fnmatch() used for simple non-CIFS pattern matching, so selecting
the lib/util implementation should not be a concern.

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
fa289e8982 s3-lib Remove unused dos error codes from errmap_unix
This also makes unix_nt_errmap private to errmap_unix.c and errormap.c
so the tables themselves cannot be duplicate symbols until merged.

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
a5a84415e2 Fix broken interface to set_namearray() - don't modify incoming string. 2011-05-06 01:44:07 +02:00
Jeremy Allison
7d6ebe0de7 More const fixes. Remove CONST_DISCARD. 2011-05-06 01:44:07 +02:00
Jeremy Allison
02af307585 More simple const fixes. 2011-05-05 23:56:07 +02:00
Jeremy Allison
e131c94ac1 More const fixes for compiler warnings from the waf build. 2011-05-05 23:56:07 +02:00
Jeremy Allison
9efea96d16 More const compiler warning fixes. 2011-05-05 11:29:01 -07:00
Jeremy Allison
4f41be356a Fix many const compiler warnings. 2011-05-05 10:41:59 -07:00
Günther Deschner
63ebc918e4 s3-lib: run minimal_includes.pl.
Guenther
2011-05-05 02:05:26 +02:00
Jeremy Allison
2938fe6f90 Fold null terminator into listlen length, change to strlcpy. 2011-05-04 12:12:14 -07:00
Günther Deschner
4fa2bac6e7 s3-system: move LOCK_ defines to lib/system.c
Guenther
2011-05-03 21:03:47 +02:00
Andrew Bartlett
f08250eb55 s3-ctdb Fix duplicate function name due to packet -> ctdb_packet rename.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-05-03 14:38:29 +02:00
Andrew Bartlett
2c32534d5b lib/util Use lib/util/util_str.c in common, including strequal()
strequal() is now implemented in terms of strcasecmp_m() which is
tested in smbtorture and which does not talloc() for ASCII or
non-ASCII comparions, and has an ASCII fast-path.

Andrew Bartlett
2011-05-03 07:37:07 +02:00
Andrew Bartlett
80f1d49b61 lib/util/charset Use push_string and talloc_strupper/strlower from common code
The only caller of push_string() (not to be confused with
push_string_check()) in the common code was encode_pw_buffer(), and it
didn't use the alignment or STR_UPPER flags.

The talloc_strupper() and talloc_strlower() functions are tested in
smbtorture, and are next_codepoint() based.

Andrew Bartlett
2011-05-03 07:37:07 +02:00
Andrew Bartlett
7c083caf74 s3-lib make push_ucs2() static 2011-05-03 07:37:07 +02:00
Andrew Bartlett
2742ec0e34 Remove strlower_m() and strupper_m() from source4 and common code.
This function is problematic because a string may expand in size when
changed into upper or lower case.  This will then push characters off
the end of the string in the s3 implementation, or panic in the former
s4 implementation.

Andrew Bartlett
2011-05-03 07:37:07 +02:00
Andrew Bartlett
eea783e04c lib/util Move set_socket_options() into common code. 2011-05-03 07:37:07 +02:00
Andrew Bartlett
fbea52f74a lib/util Move more network utility functions from source3 into lib/util
This will help with the merge of the interfaces layer.

Andrew Bartlett
2011-05-03 07:37:07 +02:00
Andrew Bartlett
85fa87ea82 s3-ctdb Rename packet file and files to ctdb_packet
This avoids a conflicts with the Samba4 packet.c, as these is only
used in CTDB

Andrew Bartlett
2011-05-03 07:37:07 +02:00
Günther Deschner
c1f3ff7340 s3-util: move valid_share_pathname() to lib/util.c
Guenther
2011-05-02 15:03:43 +02:00
Andrew Bartlett
1018dd1826 s3-lib: Rely on uint64_t in conv_str_size()
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sat Apr 30 05:58:35 CEST 2011 on sn-devel-104
2011-04-30 05:58:35 +02:00
Günther Deschner
bc781bf7d9 s3-proto: remove duplicate prototypes.
Guenther
2011-04-29 21:01:05 +02:00
Günther Deschner
50883cfeb4 s3-tevent: only include ../lib/util/tevent wrappers where needed.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Apr 29 14:00:30 CEST 2011 on sn-devel-104
2011-04-29 14:00:30 +02:00
Günther Deschner
12476223c6 s3-tsocket: only include ../lib/tsocket/tsocket.h where needed.
Guenther
2011-04-29 12:19:04 +02:00
Andrew Bartlett
93ace5cc24 lib/util Re-merge the string_sub() and all_string_sub() from source3
Andrew Bartlett
2011-04-29 16:38:15 +10:00
Andrew Bartlett
9a9124b087 lib/util/charset Move strstr_m() to the top level 2011-04-29 16:38:14 +10:00
Andrew Bartlett
6021af4fd3 libcli/smb Move attrib_string in common 2011-04-29 16:38:14 +10:00
Andrew Bartlett
724915f721 s3-client Add TALLOC_CTX argument to attrib_string().
This ensures the caller knows where the memory was allocated.

Andrew Bartlett
2011-04-29 16:38:14 +10:00
Andrew Bartlett
0520da2bbe s3-smb Use FILE_ATTRIBUTE_ARCHIVE intead of aARCH
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:13 +10:00
Andrew Bartlett
0eca33bbf6 s3-smb Use FILE_ATTRIBUTE_DIRECTORY intead of aDIR
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:13 +10:00
Andrew Bartlett
08c90d6f2d s3-smb Use FILE_ATTRIBUTE_VOLUME intead of aVOLID
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:13 +10:00
Andrew Bartlett
0a3c84b554 s3-smb Use FILE_ATTRIBUTE_SYSTEM intead of aSYSTEM
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:13 +10:00
Andrew Bartlett
317e19aeb3 s3-smb Use FILE_ATTRIBUTE_HIDDEN intead of aHIDDEN
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:12 +10:00
Andrew Bartlett
7f66ebde2e s3-smb Use FILE_ATTRIBUTE_READONLY intead of aRONLY
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:12 +10:00
Andrew Bartlett
0df4061cff lib/util/charset Merge talloc-based pull and push charset functions
These were copied from source3/lib/charcnv.c

Andrew Bartlett
2011-04-28 05:30:20 +02:00