1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
samba-mirror/lib
Ralph Boehme 738797d8ad lib/replace: validate xattr namespace prefix on FreeBSD
We should validate the xattr name string ensuring it either begins with
"sytem." or "user.". If it doesn't, we should fail the request with
EINVAL.

The FreeBSD xattr API uses namespaces but doesn't put the namespace name
as a string prefix at the beginning of the xattr name. It gets passed as
an additional int arg instead.

On the other hand, our libreplace xattr API expects the caller to put a
namespace prefix into the xattr name.

Unfortunately the conversion and stripping of the namespace string prefix
from the xattr name gives the following unexpected result on FreeBSD:

rep_setxattr("foo.bar", ...) => xattr with name "bar"

The code checks if the name begins with "system.", if it doesn't find
it, it defaults to the user namespace and then does a strchr(name, '.')
which skips *any* leading string before the first dot.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12490

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-02-10 18:33:17 +01:00
..
addns wscript: remove executable bits for all wscript* files 2017-01-11 20:21:01 +01:00
afs waf: add --with-fake-kaserver option 2014-06-04 20:09:38 +02:00
async_req lib/async_req: add writev_cancel() 2016-10-26 11:20:12 +02:00
compression lib/compression/tests: add missing #include "torture/local/proto.h" 2014-04-02 09:03:44 +02:00
crypto lib: Fix some whitespace 2016-05-16 19:52:22 +02:00
dbwrap dbwrap: Remove dbwrap_watchers.tdb based code 2016-07-15 20:43:16 +02:00
krb5_wrap wscript: remove executable bits for all wscript* files 2017-01-11 20:21:01 +01:00
ldb wscript: remove executable bits for all wscript* files 2017-01-11 20:21:01 +01:00
ldb-samba ldb-samba: Add new extended match rule DSDB_MATCH_FOR_EXPUNGE 2016-09-01 05:49:14 +02:00
nss_wrapper nss_wrapper: Add missing check for printf format validation 2016-08-09 15:16:17 +02:00
param rpc_server: Allow to configure the port range for RPC services 2017-01-27 08:09:15 +01:00
pthreadpool Move pthreadpool to top of the tree. 2017-02-09 20:04:12 +01:00
replace lib/replace: validate xattr namespace prefix on FreeBSD 2017-02-10 18:33:17 +01:00
resolv_wrapper resolv_wrapper: Update config variable name to match the code 2016-08-09 18:20:00 +02:00
smbconf lib/smbconf: remove const warning 2014-11-14 23:27:05 +01:00
socket Add explicit dependency on samba-debug from libinterfaces and libserverrole. 2017-01-23 08:26:43 +01:00
socket_wrapper swrap: Build socket_wrapper path relative to blddir 2016-07-11 12:19:13 +02:00
talloc talloc/wscript: avoid passing pointless enabled=True to SAMBA_PYTHON() 2017-02-01 18:16:58 +01:00
tdb tdb: version 1.3.12 2016-11-30 20:02:28 +01:00
tdb_wrap tdb_wrap: Use a struct initializer 2015-07-23 14:39:18 +02:00
tdr lib: Fix 1354521 Unchecked return value 2016-03-01 21:49:44 +01:00
tevent wscript: remove executable bits for all wscript* files 2017-01-11 20:21:01 +01:00
texpect texpect: undefined symbol rep_fprintf 2015-10-22 14:28:17 +02:00
torture lib:torture: Make variables const 2016-11-20 17:29:08 +01:00
tsocket tsocket: Do not dereference a NULL pointer 2016-06-30 02:53:01 +02:00
uid_wrapper lib: Update uid_wrapper to version 1.2.1 2016-03-22 00:23:20 +01:00
util binsearch: make BINARY_ARRAY_SEARCH_GTE compare against a pointer 2017-02-09 03:17:15 +01:00
README
wscript_build Remove 'external' python module support code - use the third_party directory instead. 2015-03-06 04:41:48 +01:00

compression - Various compression algorithms (MSZIP, lzxpress)
dnspython - Python module for working with DNS.
nss_wrapper - Wrapper for the user and group NSS API allowing the use 
              of other data sources.
popt - Command-line option parsing library
replace - Provides replacements for standard (POSIX, C99) functions 
          not provided by the host platform.
socket_wrapper - Wrapper library allowing TCP/IP traffic to be redirected 
                 over Unix domain sockets.
subunit - Utilities and bindings for working with the Subunit test result 
          reporting protocol.
talloc - Hierarchical pool based memory allocator 
tdb - Simple but fast key/value database library, supporting multiple writers
torture - Simple unit testing helper library