[PATCH] From the attic

Ralph Böhme slow at samba.org
Thu Oct 19 20:57:44 UTC 2017


Hi Volker,

I've been carrying these along for some time... signed-off by you, reviewed by
me. If you don't mind and noone else objects I'll push later on.

-slow
-------------- next part --------------
From 31bcf8ab411aaa3bf8520fa3c0bcc770fdf3c774 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Tue, 15 Aug 2017 05:58:05 +0200
Subject: [PATCH 1/4] nfs4acls: Fix a debug message

Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
---
 source3/modules/nfs4_acls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c
index b755344322e..538517f4a3c 100644
--- a/source3/modules/nfs4_acls.c
+++ b/source3/modules/nfs4_acls.c
@@ -180,7 +180,7 @@ struct SMB4ACE_T *smb_add_ace4(struct SMB4ACL_T *acl, SMB_ACE4PROP_T *prop)
 	ace = talloc_zero(acl, struct SMB4ACE_T);
 	if (ace==NULL)
 	{
-		DEBUG(0, ("TALLOC_SIZE failed\n"));
+		DBG_ERR("talloc_zero failed\n");
 		errno = ENOMEM;
 		return NULL;
 	}
-- 
2.13.5


From bcf0f88e7a6b4569eef16edfecb9abbdaa720fbd Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Tue, 15 Aug 2017 06:02:13 +0200
Subject: [PATCH 2/4] nfs4acls: Slightly simplify smb_add_ace4

The comment was a bit confusing to me, it took a few seconds too many to figure
out *why* setting NULL is not required. Remove it :-)

Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
---
 source3/modules/nfs4_acls.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c
index 538517f4a3c..19f0fefdb98 100644
--- a/source3/modules/nfs4_acls.c
+++ b/source3/modules/nfs4_acls.c
@@ -184,8 +184,7 @@ struct SMB4ACE_T *smb_add_ace4(struct SMB4ACL_T *acl, SMB_ACE4PROP_T *prop)
 		errno = ENOMEM;
 		return NULL;
 	}
-	/* ace->next = NULL not needed */
-	memcpy(&ace->prop, prop, sizeof(SMB_ACE4PROP_T));
+	ace->prop = *prop;
 
 	if (acl->first==NULL)
 	{
-- 
2.13.5


From 166d75a4cf1f9914e0c67571129903b2a4665f01 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Tue, 15 Aug 2017 08:17:22 +0200
Subject: [PATCH 3/4] nfs4acls: Don't generate an interface table for
 nfs4acls.idl

Nobody uses the function nfs4acl_test.

It took a while to figure out how to get this to build. The "uuid" line in the
idl file triggers pidl to generate the function table entry, which in turn then
triggers tables.pl to register this interface
./bin/default/source4/librpc/gen_ndr/tables.c. We could for example do the same
with xattr_parse_DOSATTRIB. Nobody uses this.

Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
---
 librpc/idl/nfs4acl.idl       | 6 +-----
 librpc/idl/wscript_build     | 3 ++-
 source4/librpc/wscript_build | 1 -
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/librpc/idl/nfs4acl.idl b/librpc/idl/nfs4acl.idl
index 13a6d131dcf..5a3d0268f21 100644
--- a/librpc/idl/nfs4acl.idl
+++ b/librpc/idl/nfs4acl.idl
@@ -7,7 +7,7 @@
 
 import "misc.idl", "security.idl";
 
-[ uuid("18763978-8625-abc3-54ca-9892bacdf321"),
+[
   version(1.0),
   pointer_default(unique)
 ]
@@ -39,8 +39,4 @@ interface nfs4acl_interface
 		uint32 a_other_mask;
 		nfs4ace ace[a_count];
 	} nfs4acl;
-
-	NTSTATUS nfs4acl_test(
-		[in]  nfs4acl acl
-		);
 }
diff --git a/librpc/idl/wscript_build b/librpc/idl/wscript_build
index 899708cd5d6..e19f1a8c1d8 100644
--- a/librpc/idl/wscript_build
+++ b/librpc/idl/wscript_build
@@ -37,12 +37,13 @@ bld.SAMBA_PIDL_LIST('PIDL',
                     printcap.idl
                     fsrvp_state.idl
                     cab.idl
+                    nfs4acl.idl
                     ''',
                     options='--header --ndr-parser',
                     output_dir='../gen_ndr')
 
 bld.SAMBA_PIDL_LIST('PIDL',
-		    'dnsp.idl nfs4acl.idl',
+		    'dnsp.idl',
                     options='--header --ndr-parser --client --python',
                     output_dir='../gen_ndr')
 
diff --git a/source4/librpc/wscript_build b/source4/librpc/wscript_build
index a381a65e3fa..024e17682a6 100644
--- a/source4/librpc/wscript_build
+++ b/source4/librpc/wscript_build
@@ -110,7 +110,6 @@ bld.SAMBA_SUBSYSTEM('ndr-table',
                     NDR_FRSRPC
                     NDR_FRSAPI
                     NDR_FRSTRANS
-                    NDR_NFS4ACL
                     NDR_NTP_SIGND
                     NDR_DCOM
                     NDR_WMI
-- 
2.13.5


From f43b46370fe6a992c4ba5b541119b94a209f9a0f Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Tue, 15 Aug 2017 08:25:34 +0200
Subject: [PATCH 4/4] xattr.idl: Don't generate an interface table

Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
---
 librpc/idl/wscript_build     | 4 ++--
 librpc/idl/xattr.idl         | 5 -----
 source4/librpc/wscript_build | 1 -
 3 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/librpc/idl/wscript_build b/librpc/idl/wscript_build
index e19f1a8c1d8..75eba7d54a5 100644
--- a/librpc/idl/wscript_build
+++ b/librpc/idl/wscript_build
@@ -6,7 +6,7 @@ bld.SAMBA_PIDL_LIST('PIDL',
                        audiosrv.idl dfsblobs.idl dsbackup.idl eventlog.idl file_id.idl keysvc.idl
                        msgsvc.idl ntsvcs.idl remact.idl security.idl smb_acl.idl unixinfo.idl wzcsvc.idl
                        browser.idl dfs.idl dssetup.idl frsapi.idl krb5pac.idl
-                       named_pipe_auth.idl orpc.idl rot.idl spoolss.idl w32time.idl xattr.idl
+                       named_pipe_auth.idl orpc.idl rot.idl spoolss.idl w32time.idl
                        dbgidl.idl dnsserver.idl echo.idl frsrpc.idl lsa.idl nbt.idl dns.idl
                        oxidresolver.idl samr.idl server_id.idl srvsvc.idl winreg.idl dcerpc.idl
                        drsblobs.idl efs.idl frstrans.idl mgmt.idl netlogon.idl
@@ -24,7 +24,7 @@ bld.SAMBA_PIDL_LIST('PIDL',
                     output_dir='../gen_ndr')
 
 bld.SAMBA_PIDL_LIST('PIDL',
-                    'idmap.idl messaging.idl',
+                    'idmap.idl messaging.idl xattr.idl',
                     options='--header --ndr-parser --client --python',
                     output_dir='../gen_ndr')
 
diff --git a/librpc/idl/xattr.idl b/librpc/idl/xattr.idl
index 0098b89afa5..38d32fd85b1 100644
--- a/librpc/idl/xattr.idl
+++ b/librpc/idl/xattr.idl
@@ -11,7 +11,6 @@
 import "security.idl";
 
 [
-  uuid("12345778-1234-abcd-0001-00000002"),
   version(0.0),
   helper("../librpc/ndr/ndr_xattr.h"),
   pyhelper("librpc/ndr/py_xattr.c"),
@@ -105,10 +104,6 @@ interface xattr
 		[switch_is(version)] xattr_DosInfo info;
 	} xattr_DOSATTRIB;
 
-	void xattr_parse_DOSATTRIB(
-		[in] xattr_DOSATTRIB x
-	);
-
 	/* we store DOS style extended attributes in a DosEAs xattr */
 	const char *XATTR_DOSEAS_NAME = "user.DosEAs";
 
diff --git a/source4/librpc/wscript_build b/source4/librpc/wscript_build
index 024e17682a6..1c3f8dedd15 100644
--- a/source4/librpc/wscript_build
+++ b/source4/librpc/wscript_build
@@ -93,7 +93,6 @@ bld.SAMBA_SUBSYSTEM('ndr-table',
                     NDR_TRKWKS
                     NDR_KEYSVC
                     ndr-krb5pac
-                    NDR_XATTR
                     NDR_SCHANNEL
                     NDR_ROT
                     NDR_DRSBLOBS
-- 
2.13.5



More information about the samba-technical mailing list