[SCM] Samba Shared Repository - branch master updated
Günther Deschner
gd at samba.org
Tue Jan 25 04:27:02 MST 2011
The branch, master has been updated
via c9f4fad idl: add file_id idl.
via f0b3c72 s3-libndr: remove cmdline_lp_ctx.
via dd35fe1 waf: share libndr.so between samba3 and samba4.
via 7eac310 libndr: move ndr_print_bool to ndr_basic.c
via 62e1c80 s3-waf: add PKGCONFIGDIR.
from 07ccc29 s3-smbclient: Fix cli_errstr() usage (part of bug #7864)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit c9f4fad75cf9749709cbebfe55c59f3c2d01858e
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 25 02:42:59 2011 +0100
idl: add file_id idl.
Guenther
Autobuild-User: Günther Deschner <gd at samba.org>
Autobuild-Date: Tue Jan 25 12:27:00 CET 2011 on sn-devel-104
commit f0b3c72bcc119f497a4379c549bc55fb1031ce90
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 25 02:52:18 2011 +0100
s3-libndr: remove cmdline_lp_ctx.
Guenther
commit dd35fe181c2397a970fa956afa5f4da534841b99
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 25 02:01:56 2011 +0100
waf: share libndr.so between samba3 and samba4.
Guenther
commit 7eac3100ea77eca64152444336180418938d5843
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 25 00:52:10 2011 +0100
libndr: move ndr_print_bool to ndr_basic.c
Guenther
commit 62e1c80cf532681c02ecd2ddcb7c920381a0465e
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 25 00:47:05 2011 +0100
s3-waf: add PKGCONFIGDIR.
Guenther
-----------------------------------------------------------------------
Summary of changes:
librpc/idl/file_id.idl | 14 ++++++++++++
librpc/idl/wscript_build | 2 +-
librpc/ndr/libndr.h | 2 +
librpc/ndr/ndr_basic.c | 5 ++++
librpc/wscript_build | 15 +++++++++++++
source3/Makefile.in | 2 +-
source3/build/dynconfig.py | 1 +
source3/include/locking.h | 9 +-------
source3/include/proto.h | 4 ---
source3/librpc/idl/notify.idl | 2 +
source3/librpc/ndr/util.c | 46 -----------------------------------------
source3/librpc/wscript_build | 2 +-
source3/wscript_build | 14 +++---------
source4/librpc/wscript_build | 11 ---------
14 files changed, 47 insertions(+), 82 deletions(-)
create mode 100644 librpc/idl/file_id.idl
Changeset truncated at 500 lines:
diff --git a/librpc/idl/file_id.idl b/librpc/idl/file_id.idl
new file mode 100644
index 0000000..cd1febe
--- /dev/null
+++ b/librpc/idl/file_id.idl
@@ -0,0 +1,14 @@
+[
+ pointer_default(unique)
+]
+interface file_id
+{
+ typedef [public] struct {
+ /* we don't use SMB_DEV_T and SMB_INO_T as we want a fixed size here,
+ and we may be using file system specific code to fill in something
+ other than a dev_t for the device */
+ udlong devid;
+ udlong inode;
+ udlong extid; /* Support systems that use an extended id (e.g. snapshots). */
+ } file_id;
+}
diff --git a/librpc/idl/wscript_build b/librpc/idl/wscript_build
index 2d65d74..7342228 100644
--- a/librpc/idl/wscript_build
+++ b/librpc/idl/wscript_build
@@ -3,7 +3,7 @@
bld.SAMBA_PIDL_LIST('PIDL',
'''atsvc.idl drsuapi.idl epmapper.idl initshutdown.idl
misc.idl ntlmssp.idl schannel.idl trkwks.idl
- audiosrv.idl dfsblobs.idl dsbackup.idl eventlog.idl keysvc.idl
+ audiosrv.idl dfsblobs.idl dsbackup.idl eventlog.idl file_id.idl keysvc.idl
msgsvc.idl ntsvcs.idl remact.idl security.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
diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h
index 06cc93a..ff20755 100644
--- a/librpc/ndr/libndr.h
+++ b/librpc/ndr/libndr.h
@@ -571,4 +571,6 @@ _PUBLIC_ enum ndr_err_code ndr_push_enum_uint16(struct ndr_push *ndr, int ndr_fl
_PUBLIC_ enum ndr_err_code ndr_push_enum_uint32(struct ndr_push *ndr, int ndr_flags, uint32_t v);
_PUBLIC_ enum ndr_err_code ndr_push_enum_uint1632(struct ndr_push *ndr, int ndr_flags, uint16_t v);
+_PUBLIC_ void ndr_print_bool(struct ndr_print *ndr, const char *name, const bool b);
+
#endif /* __LIBNDR_H__ */
diff --git a/librpc/ndr/ndr_basic.c b/librpc/ndr/ndr_basic.c
index ff207f4..d628faa 100644
--- a/librpc/ndr/ndr_basic.c
+++ b/librpc/ndr/ndr_basic.c
@@ -1208,3 +1208,8 @@ _PUBLIC_ uint32_t ndr_size_DATA_BLOB(int ret, const DATA_BLOB *data, int flags)
if (!data) return ret;
return ret + data->length;
}
+
+_PUBLIC_ void ndr_print_bool(struct ndr_print *ndr, const char *name, const bool b)
+{
+ ndr->print(ndr, "%-25s: %s", name, b?"true":"false");
+}
diff --git a/librpc/wscript_build b/librpc/wscript_build
index 236a728..89d0980 100644
--- a/librpc/wscript_build
+++ b/librpc/wscript_build
@@ -286,6 +286,11 @@ bld.SAMBA_SUBSYSTEM('NDR_BACKUPKEY',
public_deps='ndr'
)
+bld.SAMBA_SUBSYSTEM('NDR_FILE_ID',
+ source='../librpc/gen_ndr/ndr_file_id.c',
+ public_deps='ndr'
+ )
+
bld.SAMBA_SUBSYSTEM('RPC_NDR_XATTR',
source='../librpc/gen_ndr/ndr_xattr_c.c',
public_deps='NDR_XATTR dcerpc'
@@ -493,3 +498,13 @@ bld.SAMBA_LIBRARY('dcerpc-samba',
private_library=True,
grouping_library=True
)
+
+bld.SAMBA_LIBRARY('ndr',
+ source='../librpc/ndr/ndr_string.c ../librpc/ndr/ndr_basic.c ../librpc/ndr/uuid.c ../librpc/ndr/ndr.c ../librpc/ndr/ndr_misc.c ../librpc/gen_ndr/ndr_misc.c',
+ pc_files='../librpc/ndr.pc',
+ public_deps='errors talloc samba-util',
+ public_headers='../librpc/gen_ndr/misc.h ../librpc/gen_ndr/ndr_misc.h ../librpc/ndr/libndr.h:ndr.h',
+ header_path= [ ( '*gen_ndr*', 'gen_ndr' ) ],
+ depends_on='PIDL_MISC',
+ vnum='0.0.1'
+ )
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 0ce97b8..5a4435b 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -769,7 +769,7 @@ OPLOCK_OBJ = smbd/oplock.o smbd/oplock_irix.o smbd/oplock_linux.o \
smbd/oplock_onefs.o
NOTIFY_OBJ = smbd/notify.o smbd/notify_inotify.o smbd/notify_internal.o \
- librpc/gen_ndr/ndr_notify.o
+ librpc/gen_ndr/ndr_notify.o librpc/gen_ndr/ndr_file_id.o
FNAME_UTIL_OBJ = smbd/filename_util.o
diff --git a/source3/build/dynconfig.py b/source3/build/dynconfig.py
index 0654710..f243baa 100644
--- a/source3/build/dynconfig.py
+++ b/source3/build/dynconfig.py
@@ -38,6 +38,7 @@ dyn_cflags = {
'NMBDSOCKETDIR' : '${LOCKDIR}/.nmbd',
'NTP_SIGND_SOCKET_DIR' : '${NTP_SIGND_SOCKET_DIR}',
'PIDDIR' : '${LOCALSTATEDIR}/run',
+ 'PKGCONFIGDIR' : '${LIBDIR}/pkgconfigdir',
'PRIVATE_DIR' : '${PRIVATEDIR}',
'SBINDIR' : '${SBINDIR}',
'SETUPDIR' : '${DATADIR}/setup',
diff --git a/source3/include/locking.h b/source3/include/locking.h
index 88104b0..5504da6 100644
--- a/source3/include/locking.h
+++ b/source3/include/locking.h
@@ -43,14 +43,7 @@ struct lock_context {
struct files_struct;
-struct file_id {
- /* we don't use SMB_DEV_T and SMB_INO_T as we want a fixed size here,
- and we may be using file system specific code to fill in something
- other than a dev_t for the device */
- uint64_t devid;
- uint64_t inode;
- uint64_t extid; /* Support systems that use an extended id (e.g. snapshots). */
-};
+#include "../librpc/gen_ndr/file_id.h"
struct byte_range_lock {
struct files_struct *fsp;
diff --git a/source3/include/proto.h b/source3/include/proto.h
index de6e7ac..29dbcc9 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1584,10 +1584,6 @@ unsigned wins_srv_count_tag(const char *tag);
enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct server_id *r);
enum ndr_err_code ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, struct server_id *r);
void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct server_id *r);
-enum ndr_err_code ndr_push_file_id(struct ndr_push *ndr, int ndr_flags, const struct file_id *r);
-enum ndr_err_code ndr_pull_file_id(struct ndr_pull *ndr, int ndr_flags, struct file_id *r);
-void ndr_print_file_id(struct ndr_print *ndr, const char *name, const struct file_id *r);
-_PUBLIC_ void ndr_print_bool(struct ndr_print *ndr, const char *name, const bool b);
_PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss);
const char *ndr_errstr(enum ndr_err_code err);
extern const struct ndr_syntax_id null_ndr_syntax_id;
diff --git a/source3/librpc/idl/notify.idl b/source3/librpc/idl/notify.idl
index 040f661..e776d5d 100644
--- a/source3/librpc/idl/notify.idl
+++ b/source3/librpc/idl/notify.idl
@@ -1,5 +1,7 @@
#include "idl_types.h"
+import "file_id.idl";
+
/*
IDL structures for notify change code
diff --git a/source3/librpc/ndr/util.c b/source3/librpc/ndr/util.c
index d6a41a0..ed24f87 100644
--- a/source3/librpc/ndr/util.c
+++ b/source3/librpc/ndr/util.c
@@ -161,57 +161,11 @@ void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct s
ndr->depth--;
}
-enum ndr_err_code ndr_push_file_id(struct ndr_push *ndr, int ndr_flags, const struct file_id *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS,
- (uint64_t)r->devid));
- NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS,
- (uint64_t)r->inode));
- NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS,
- (uint64_t)r->extid));
- }
- if (ndr_flags & NDR_BUFFERS) {
- }
- return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_pull_file_id(struct ndr_pull *ndr, int ndr_flags, struct file_id *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->devid));
- NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->inode));
- NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->extid));
- }
- if (ndr_flags & NDR_BUFFERS) {
- }
- return NDR_ERR_SUCCESS;
-}
-
-void ndr_print_file_id(struct ndr_print *ndr, const char *name, const struct file_id *r)
-{
- ndr_print_struct(ndr, name, "file_id");
- ndr->depth++;
- ndr_print_udlong(ndr, "devid", (uint64_t)r->devid);
- ndr_print_udlong(ndr, "inode", (uint64_t)r->inode);
- ndr_print_udlong(ndr, "extid", (uint64_t)r->extid);
- ndr->depth--;
-}
-
-_PUBLIC_ void ndr_print_bool(struct ndr_print *ndr, const char *name, const bool b)
-{
- ndr->print(ndr, "%-25s: %s", name, b?"true":"false");
-}
-
_PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss)
{
char addr[INET6_ADDRSTRLEN];
ndr->print(ndr, "%-25s: %s", name, print_sockaddr(addr, sizeof(addr), ss));
}
-void *cmdline_lp_ctx;
-
const struct ndr_syntax_id null_ndr_syntax_id =
{ { 0, 0, 0, { 0, 0 }, { 0, 0, 0, 0, 0, 0 } }, 0 };
diff --git a/source3/librpc/wscript_build b/source3/librpc/wscript_build
index 5b30507..adf7f70 100644
--- a/source3/librpc/wscript_build
+++ b/source3/librpc/wscript_build
@@ -17,7 +17,7 @@ bld.SAMBA_SUBSYSTEM('NDR_MESSAGING',
bld.SAMBA_SUBSYSTEM('NDR_NOTIFY',
source='gen_ndr/ndr_notify.c',
- public_deps='ndr'
+ public_deps='ndr NDR_FILE_ID'
)
bld.SAMBA_SUBSYSTEM('NDR_PREG',
diff --git a/source3/wscript_build b/source3/wscript_build
index 46eb90f..3e5876c 100644
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -34,13 +34,7 @@ COMPRESSION_SRC = '../lib/compression/mszip.c'
DRSUAPI_SRC = '''${COMPRESSION_SRC}'''
-LIBNDR_SRC = '''../librpc/ndr/ndr_basic.c
- ../librpc/ndr/ndr.c
- ../librpc/ndr/ndr_misc.c
- ../librpc/gen_ndr/ndr_misc.c
- ../librpc/ndr/ndr_string.c
- ../librpc/ndr/uuid.c
- librpc/ndr/util.c'''
+LIBNDR_SRC = '''librpc/ndr/util.c'''
LIBCLI_SPOOLSS_SRC = '''rpc_client/cli_spoolss.c
rpc_client/init_spoolss.c'''
@@ -759,7 +753,7 @@ if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):
bld.SAMBA_SUBSYSTEM('LIBMSRPC',
source='${LIBMSRPC_SRC}',
- deps='''ndr NDR_SECURITY NDR_DCERPC NDR_SCHANNEL
+ deps='''ndr ndr-util NDR_SECURITY NDR_DCERPC NDR_SCHANNEL
RPC_NDR_EPMAPPER COMMON_SCHANNELDB LIBCLI_AUTH''',
vars=locals())
@@ -845,7 +839,7 @@ bld.SAMBA_SUBSYSTEM('KRBCLIENT',
bld.SAMBA_SUBSYSTEM('LIBS',
source=LIB_SRC,
- deps='LIBCRYPTO ndr security NDR_SECURITY charset NDR_MESSAGING LIBASYNC_REQ tdb-wrap samba-util CHARSET UTIL_TDB SAMBA_VERSION',
+ deps='LIBCRYPTO ndr ndr-util security NDR_SECURITY charset NDR_MESSAGING LIBASYNC_REQ tdb-wrap samba-util CHARSET UTIL_TDB SAMBA_VERSION',
vars=locals())
bld.SAMBA_SUBSYSTEM('LIB_NONSMBD',
@@ -1025,7 +1019,7 @@ bld.SAMBA_SUBSYSTEM('DCUTIL',
source=DCUTIL_SRC,
vars=locals())
-bld.SAMBA_SUBSYSTEM('ndr',
+bld.SAMBA_SUBSYSTEM('ndr-util',
source=LIBNDR_SRC,
vars=locals())
diff --git a/source4/librpc/wscript_build b/source4/librpc/wscript_build
index 5cff4a9..4e2b672 100755
--- a/source4/librpc/wscript_build
+++ b/source4/librpc/wscript_build
@@ -3,17 +3,6 @@
bld.RECURSE('../../librpc/idl')
bld.RECURSE('idl')
-bld.SAMBA_LIBRARY('ndr',
- source='../../librpc/ndr/ndr_string.c ../../librpc/ndr/ndr_basic.c ../../librpc/ndr/uuid.c ../../librpc/ndr/ndr.c ../../librpc/ndr/ndr_misc.c ../../librpc/gen_ndr/ndr_misc.c',
- pc_files='../../librpc/ndr.pc',
- public_deps='errors talloc samba-util',
- public_headers='../../librpc/gen_ndr/misc.h ../../librpc/gen_ndr/ndr_misc.h ../../librpc/ndr/libndr.h:ndr.h',
- header_path= [ ( '*gen_ndr*', 'gen_ndr' ) ],
- depends_on='PIDL_MISC',
- vnum='0.0.1'
- )
-
-
bld.SAMBA_BINARY('ndrdump',
source='../../librpc/tools/ndrdump.c',
manpages='../../librpc/tools/ndrdump.1',
--
Samba Shared Repository
More information about the samba-cvs
mailing list