[SCM] Samba Shared Repository - branch master updated

2015-04-02 Thread Michael Adam
The branch, master has been updated
   via  b542d1c build:wafsamba: fix a typo
   via  8a19314 vfs_ceph: add empty ACL callbacks
   via  628fa5b vfs_ceph: use 'file descriptor' version xattr functions 
when possible
  from  12309f8 ctdb: check for talloc_asprintf() failure

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit b542d1c83fd84d43e9441c28b80194964ec9bc73
Author: Michael Adam ob...@samba.org
Date:   Wed Apr 1 12:56:05 2015 +0200

build:wafsamba: fix a typo

Signed-off-by: Michael Adam ob...@samba.org
Reviewed-by: Ira Cooper i...@samba.org

Autobuild-User(master): Michael Adam ob...@samba.org
Autobuild-Date(master): Thu Apr  2 16:39:01 CEST 2015 on sn-devel-104

commit 8a1931413210db79fd671535ec4ba289dee7f710
Author: Yan, Zheng z...@redhat.com
Date:   Thu Apr 2 10:11:03 2015 +0800

vfs_ceph: add empty ACL callbacks

If a vfs module has no ACL callbacks, smbd will use its default ACL
callbacks. These default ACL callbacks operate on local filesytem,
it's clearly wrong for ceph case.

libcephfs does not support ACL yet, so this patch adds ACL callbacks
that do nothing.

Signed-off-by: Yan, Zheng z...@redhat.com
Reviewed-by: Ira Cooper i...@samba.org
Reviewed-by: Michael Adam ob...@samba.org

commit 628fa5bc00d8ef7593398f3dfa2af6652013f12f
Author: Yan, Zheng z...@redhat.com
Date:   Thu Apr 2 10:11:02 2015 +0800

vfs_ceph: use 'file descriptor' version xattr functions when possible

libcephfs version 0.94 adds 'file descriptor' version xattr functions.
This patch makes corresponding samba VFS callbacks use these new
functions.

Signed-off-by: Yan, Zheng z...@redhat.com
Reviewed-by: Ira Cooper i...@samba.org
Reviewed-by: Michael Adam ob...@samba.org

---

Summary of changes:
 buildtools/wafsamba/wscript |  6 ++--
 source3/modules/vfs_ceph.c  | 70 +
 2 files changed, 73 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index 3180543..694147e 100755
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -41,10 +41,10 @@ def set_options(opt):
help=(comma separated list of libraries to not apply 
extension to [%s] % extension_exception),
action=store, dest='PRIVATE_EXTENSION_EXCEPTION', 
default=extension_exception)
 
-builtin_defauilt = Options.options['BUILTIN_LIBRARIES_DEFAULT']
+builtin_default = Options.options['BUILTIN_LIBRARIES_DEFAULT']
 gr.add_option('--builtin-libraries',
-   help=(command separated list of libraries to build 
directly into binaries [%s] % builtin_defauilt),
-   action=store, dest='BUILTIN_LIBRARIES', 
default=builtin_defauilt)
+   help=(command separated list of libraries to build 
directly into binaries [%s] % builtin_default),
+   action=store, dest='BUILTIN_LIBRARIES', 
default=builtin_default)
 
 gr.add_option('--minimum-library-version',
help=(list of minimum system library versions 
(LIBNAME1:version,LIBNAME2:version)),
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index b3e334e..409189b 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -40,6 +40,11 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_VFS
 
+#ifndef LIBCEPHFS_VERSION
+#define LIBCEPHFS_VERSION(maj, min, extra) ((maj  16) + (min  8) + extra)
+#define LIBCEPHFS_VERSION_CODE LIBCEPHFS_VERSION(0, 0, 0)
+#endif
+
 /*
  * Use %llu whenever we have a 64bit unsigned int, and cast to (long long 
unsigned)
  */
@@ -1071,7 +1076,11 @@ static ssize_t cephwrap_fgetxattr(struct 
vfs_handle_struct *handle, struct files
 {
int ret;
DEBUG(10, ([CEPH] fgetxattr(%p, %p, %s, %p, %llu)\n, handle, fsp, 
name, value, llu(size)));
+#if LIBCEPHFS_VERSION_CODE = LIBCEPHFS_VERSION(0, 94, 0)
+   ret = ceph_fgetxattr(handle-data, fsp-fh-fd, name, value, size);
+#else
ret = ceph_getxattr(handle-data, fsp-fsp_name-base_name, name, 
value, size);
+#endif
DEBUG(10, ([CEPH] fgetxattr(...) = %d\n, ret));
if (ret  0) {
WRAP_RETURN(ret);
@@ -1112,7 +1121,11 @@ static ssize_t cephwrap_flistxattr(struct 
vfs_handle_struct *handle, struct file
 {
int ret;
DEBUG(10, ([CEPH] flistxattr(%p, %p, %s, %llu)\n, handle, fsp, list, 
llu(size)));
+#if LIBCEPHFS_VERSION_CODE = LIBCEPHFS_VERSION(0, 94, 0)
+   ret = ceph_flistxattr(handle-data, fsp-fh-fd, list, size);
+#else
ret = ceph_listxattr(handle-data, fsp-fsp_name-base_name, list, 
size);
+#endif
DEBUG(10, ([CEPH] flistxattr(...) = %d\n, ret));
if (ret  0) {
WRAP_RETURN(ret);
@@ 

[SCM] Samba Shared Repository - branch master updated

2015-04-02 Thread Günther Deschner
The branch, master has been updated
   via  b57c778 rpc_server: Coverity fix for CID 1273079
  from  b542d1c build:wafsamba: fix a typo

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit b57c77849af968e7a89df40d05b2e3ef7cef42c1
Author: Rajesh Joseph rjos...@redhat.com
Date:   Tue Mar 31 18:58:54 2015 +0530

rpc_server: Coverity fix for CID 1273079

leaked_storage: Variable pk going out of scope leaks the storage it points 
to.

On failure get_pk_from_raw_keypair_params function should free up
the private key (pk) it allocates internally.

Signed-off-by: Rajesh Joseph rjos...@redhat.com
Reviewed-by: Guenther Deschner g...@samba.org
Reviewed-by: Ira Cooper i...@samba.org

Autobuild-User(master): Günther Deschner g...@samba.org
Autobuild-Date(master): Thu Apr  2 19:38:22 CEST 2015 on sn-devel-104

---

Summary of changes:
 source4/rpc_server/backupkey/dcesrv_backupkey.c | 14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source4/rpc_server/backupkey/dcesrv_backupkey.c 
b/source4/rpc_server/backupkey/dcesrv_backupkey.c
index b3b7074..3edd1b6 100644
--- a/source4/rpc_server/backupkey/dcesrv_backupkey.c
+++ b/source4/rpc_server/backupkey/dcesrv_backupkey.c
@@ -306,6 +306,7 @@ static NTSTATUS get_pk_from_raw_keypair_params(TALLOC_CTX 
*ctx,
hx509_context hctx;
RSA *rsa;
struct hx509_private_key_ops *ops;
+   hx509_private_key privkey = NULL;
 
hx509_context_init(hctx);
ops = 
hx509_find_private_alg(_hx509_signature_rsa_with_var_num.algorithm);
@@ -314,13 +315,14 @@ static NTSTATUS get_pk_from_raw_keypair_params(TALLOC_CTX 
*ctx,
return NT_STATUS_INTERNAL_ERROR;
}
 
-   if (hx509_private_key_init(pk, ops, NULL) != 0) {
+   if (hx509_private_key_init(privkey, ops, NULL) != 0) {
hx509_context_free(hctx);
return NT_STATUS_NO_MEMORY;
}
 
rsa = RSA_new();
if (rsa ==NULL) {
+   hx509_private_key_free(privkey);
hx509_context_free(hctx);
return NT_STATUS_INVALID_PARAMETER;
}
@@ -328,52 +330,62 @@ static NTSTATUS get_pk_from_raw_keypair_params(TALLOC_CTX 
*ctx,
rsa-n = reverse_and_get_bignum(ctx, (keypair-modulus));
if (rsa-n == NULL) {
RSA_free(rsa);
+   hx509_private_key_free(privkey);
hx509_context_free(hctx);
return NT_STATUS_INVALID_PARAMETER;
}
rsa-d = reverse_and_get_bignum(ctx, (keypair-private_exponent));
if (rsa-d == NULL) {
RSA_free(rsa);
+   hx509_private_key_free(privkey);
hx509_context_free(hctx);
return NT_STATUS_INVALID_PARAMETER;
}
rsa-p = reverse_and_get_bignum(ctx, (keypair-prime1));
if (rsa-p == NULL) {
RSA_free(rsa);
+   hx509_private_key_free(privkey);
hx509_context_free(hctx);
return NT_STATUS_INVALID_PARAMETER;
}
rsa-q = reverse_and_get_bignum(ctx, (keypair-prime2));
if (rsa-q == NULL) {
RSA_free(rsa);
+   hx509_private_key_free(privkey);
hx509_context_free(hctx);
return NT_STATUS_INVALID_PARAMETER;
}
rsa-dmp1 = reverse_and_get_bignum(ctx, (keypair-exponent1));
if (rsa-dmp1 == NULL) {
RSA_free(rsa);
+   hx509_private_key_free(privkey);
hx509_context_free(hctx);
return NT_STATUS_INVALID_PARAMETER;
}
rsa-dmq1 = reverse_and_get_bignum(ctx, (keypair-exponent2));
if (rsa-dmq1 == NULL) {
RSA_free(rsa);
+   hx509_private_key_free(privkey);
hx509_context_free(hctx);
return NT_STATUS_INVALID_PARAMETER;
}
rsa-iqmp = reverse_and_get_bignum(ctx, (keypair-coefficient));
if (rsa-iqmp == NULL) {
RSA_free(rsa);
+   hx509_private_key_free(privkey);
hx509_context_free(hctx);
return NT_STATUS_INVALID_PARAMETER;
}
rsa-e = reverse_and_get_bignum(ctx, (keypair-public_exponent));
if (rsa-e == NULL) {
RSA_free(rsa);
+   hx509_private_key_free(privkey);
hx509_context_free(hctx);
return NT_STATUS_INVALID_PARAMETER;
}
 
+   *pk = privkey;
+
hx509_private_key_assign_rsa(*pk, rsa);
 
hx509_context_free(hctx);


-- 
Samba Shared Repository