The branch, master has been updated via aa41104 pidl: Remove depends_on=PIDL_MISC as it sets -I/ into CFLAGS via 06eee7f build: Remove support for IDL-generated files in git tree via 2756c3c lib/replace: Return size of xattr if size argument is 0 from a7b8d02 source3.selftest: Move last variables to selftesthelpers.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit aa411045a5ee52d440ccb259a37c6c7489099884 Author: Andrew Bartlett <abart...@samba.org> Date: Sun Oct 28 19:57:58 2012 +1100 pidl: Remove depends_on=PIDL_MISC as it sets -I/ into CFLAGS This in turn causes an include of <net/if.h> to hang on some systems, as /net/ means to run the automounter! Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abart...@samba.org> Autobuild-Date(master): Mon Oct 29 01:23:39 CET 2012 on sn-devel-104 commit 06eee7f50b7022451dd9bac39b46e33cd434a186 Author: Andrew Bartlett <abart...@samba.org> Date: Sun Oct 28 19:38:10 2012 +1100 build: Remove support for IDL-generated files in git tree This was added in a9ea3d6fa510286b83c4bda42c9a857da3625451 but is no longer required, as we do not store IDL-generated files in GIT. Andrew Bartlett commit 2756c3ce5c7d5d066dc76592dd1078a8594b983b Author: Andrew Bartlett <abart...@samba.org> Date: Sat Oct 27 19:15:58 2012 +1100 lib/replace: Return size of xattr if size argument is 0 This makes rep_{f,}getxattr a more complete replacement for the linux function. Andrew Bartlett ----------------------------------------------------------------------- Summary of changes: buildtools/wafsamba/samba_pidl.py | 26 ++------------------------ lib/replace/xattr.c | 15 ++++++++++++--- librpc/wscript_build | 1 - 3 files changed, 14 insertions(+), 28 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/wafsamba/samba_pidl.py b/buildtools/wafsamba/samba_pidl.py index ff13971..4056359 100644 --- a/buildtools/wafsamba/samba_pidl.py +++ b/buildtools/wafsamba/samba_pidl.py @@ -7,7 +7,6 @@ from samba_utils import * def SAMBA_PIDL(bld, pname, source, options='', output_dir='.', - symlink=False, generate_tables=True): '''Build a IDL file using pidl. This will produce up to 13 output files depending on the options used''' @@ -91,27 +90,7 @@ def SAMBA_PIDL(bld, pname, source, t.env.PIDL = os.path.join(bld.srcnode.abspath(), 'pidl/pidl') t.env.OPTIONS = TO_LIST(options) - - # this rather convoluted set of path calculations is to cope with the possibility - # that gen_ndr is a symlink into the source tree. By doing this for the source3 - # gen_ndr directory we end up generating identical output in gen_ndr for the old - # build system and the new one. That makes keeping things in sync much easier. - # eventually we should drop the gen_ndr files in git, but in the meanwhile this works - - found_dir = bld.path.find_dir(output_dir) - if not 'abspath' in dir(found_dir): - Logs.error('Unable to find pidl output directory %s' % - os.path.normpath(os.path.join(bld.curdir, output_dir))) - sys.exit(1) - - outdir = bld.path.find_dir(output_dir).abspath(t.env) - - if symlink and not os.path.lexists(outdir): - link_source = os.path.normpath(os.path.join(bld.curdir,output_dir)) - os.symlink(link_source, outdir) - - real_outputdir = os.path.realpath(outdir) - t.env.OUTPUTDIR = os_path_relpath(real_outputdir, os.path.dirname(bld.env.BUILD_DIRECTORY)) + t.env.OUTPUTDIR = bld.bldnode.name + '/' + bld.path.find_dir(output_dir).bldpath(t.env) if generate_tables and table_header_idx is not None: pidl_headers = LOCAL_CACHE(bld, 'PIDL_HEADERS') @@ -124,11 +103,10 @@ Build.BuildContext.SAMBA_PIDL = SAMBA_PIDL def SAMBA_PIDL_LIST(bld, name, source, options='', output_dir='.', - symlink=False, generate_tables=True): '''A wrapper for building a set of IDL files''' for p in TO_LIST(source): - bld.SAMBA_PIDL(name, p, options=options, output_dir=output_dir, symlink=symlink, generate_tables=generate_tables) + bld.SAMBA_PIDL(name, p, options=options, output_dir=output_dir, generate_tables=generate_tables) Build.BuildContext.SAMBA_PIDL_LIST = SAMBA_PIDL_LIST diff --git a/lib/replace/xattr.c b/lib/replace/xattr.c index 8e1c989..a26ff67 100644 --- a/lib/replace/xattr.c +++ b/lib/replace/xattr.c @@ -71,7 +71,9 @@ ssize_t rep_getxattr (const char *path, const char *name, void *value, size_t si * that the buffer is large enough to fit the returned value. */ if((retval=extattr_get_file(path, attrnamespace, attrname, NULL, 0)) >= 0) { - if(retval > size) { + if (size == 0) { + return retval; + } else if (retval > size) { errno = ERANGE; return -1; } @@ -88,6 +90,9 @@ ssize_t rep_getxattr (const char *path, const char *name, void *value, size_t si if (strncmp(name, "system", 6) == 0) flags |= ATTR_ROOT; retval = attr_get(path, attrname, (char *)value, &valuelength, flags); + if (size == 0 && retval == -1 && errno == E2BIG) { + return valuelength; + } return retval ? retval : valuelength; #elif defined(HAVE_ATTROPEN) @@ -126,7 +131,9 @@ ssize_t rep_fgetxattr (int filedes, const char *name, void *value, size_t size) const char *attrname = ((s=strchr(name, '.')) == NULL) ? name : s + 1; if((retval=extattr_get_fd(filedes, attrnamespace, attrname, NULL, 0)) >= 0) { - if(retval > size) { + if (size == 0) { + return retval; + } else if (retval > size) { errno = ERANGE; return -1; } @@ -143,7 +150,9 @@ ssize_t rep_fgetxattr (int filedes, const char *name, void *value, size_t size) if (strncmp(name, "system", 6) == 0) flags |= ATTR_ROOT; retval = attr_getf(filedes, attrname, (char *)value, &valuelength, flags); - + if (size == 0 && retval == -1 && errno == E2BIG) { + return valuelength; + } return retval ? retval : valuelength; #elif defined(HAVE_ATTROPEN) ssize_t ret = -1; diff --git a/librpc/wscript_build b/librpc/wscript_build index ee8483b..0eeb01b 100644 --- a/librpc/wscript_build +++ b/librpc/wscript_build @@ -632,7 +632,6 @@ bld.SAMBA_LIBRARY('ndr', public_deps='errors talloc samba-util', public_headers='gen_ndr/misc.h gen_ndr/ndr_misc.h ndr/libndr.h:ndr.h', header_path= [('*gen_ndr*', 'gen_ndr')], - depends_on='PIDL_MISC', vnum='0.0.1', abi_directory='ABI', abi_match='ndr_* GUID_*', -- Samba Shared Repository