summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-01-15 15:09:35 -0800
committerJeremy Allison <jra@samba.org>2008-01-15 15:09:35 -0800
commite2528bd5fd7ad65e10f218ca5cc6bfd3f8cd326f (patch)
treee3589d5cadc7d3ec5209b000b9936b267cd8817f
parentddabc2b00c8b01dfd1c019e2d3a946a766fe4e51 (diff)
parent742fb9a62038a6cdb9267f24126ecddf264ea398 (diff)
downloadsamba-e2528bd5fd7ad65e10f218ca5cc6bfd3f8cd326f.tar.gz
samba-e2528bd5fd7ad65e10f218ca5cc6bfd3f8cd326f.tar.bz2
samba-e2528bd5fd7ad65e10f218ca5cc6bfd3f8cd326f.zip
Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
(This used to be commit 0d989bf90b9b75a057b572bb4369ee3126db1fb8)
-rwxr-xr-xrelease-scripts/create-tarball85
-rw-r--r--source3/librpc/ndr/libndr.h10
-rw-r--r--source3/rpcclient/cmd_lsarpc.c22
3 files changed, 108 insertions, 9 deletions
diff --git a/release-scripts/create-tarball b/release-scripts/create-tarball
new file mode 100755
index 0000000000..459227262d
--- /dev/null
+++ b/release-scripts/create-tarball
@@ -0,0 +1,85 @@
+#!/bin/bash
+
+TOPDIR="`dirname $0`/.."
+
+cd $TOPDIR
+
+echo -n "Please enter branch to cut tarball from: "
+read branch
+
+if [ "x$branch" = "x" ]; then
+ echo "You must enter a name! Exiting...."
+ exit 1
+fi
+
+git-checkout $branch
+if [ $? -ne 0 ]; then
+ echo "Invalid branch name! Exiting...."
+ exit 2
+fi
+
+VER_H=source/include/version.h
+(cd source && ./autogen.sh)
+
+if [ ! -f $VER_H ]; then
+ echo "Failed to find $VER_H! Exiting...."
+ exit 1
+fi
+
+version=`grep SAMBA_VERSION_OFFICIAL_STRING $VER_H | awk '{print $3}'`
+version="$version-`grep SAMBA_VERSION_VENDOR_SUFFIX $VER_H | awk '{print $3}'`"
+version=`echo $version | sed 's/\"//g'`
+
+echo "Creating release tarball for Samba $version"
+
+/bin/rm -rf ../samba-${version}
+git-archive --format=tar --prefix=samba-${version}/ HEAD | (cd .. && tar xf -)
+
+pushd ../samba-${version}
+
+echo "Enter the absolute path to the generated Samba docs directory."
+echo -n "Just hit return to exclude the docs from the generate tarball: "
+read docsdir
+
+if [ "x$docsdir" != "x" ]; then
+ if [ ! -d "$docsdir" ]; then
+ echo "$docsdir does not exist! Exiting...."
+ exit 1
+ fi
+
+ /bin/rm -rf docs
+ mkdir docs
+ rsync -a $docsdir/ docs/
+
+ cd docs
+ /bin/rm -rf test.pdf Samba4*pdf htmldocs/Samba4* htmldocs/test
+ /bin/mv manpages-3 manpages
+ /bin/mv htmldocs/manpages-3 htmldocs/manpages
+ cd ..
+fi
+
+cd ..
+tar cf samba-${version}.tar --exclude=.git* --exclude=CVS --exclude=.svn samba-${version}
+gpg --detach-sign --armor samba-${version}.tar
+gzip -9 samba-${version}.tar
+
+popd
+echo -n "Enter tag name (or hit <enter> to skip): "
+read tagname
+
+if [ "x$tagname" != "x" ]; then
+ if [ "x`git-tag -l $tagname`" != "x" ]; then
+ echo -n "Tag exists. Do you wish to overwrite? (y/N): "
+ read answer
+
+ if [ "x$answer" != "xy" ]; then
+ echo "Tag creation aborted."
+ exit 1
+ fi
+ fi
+
+ git-tag -s ${tagname}
+fi
+
+echo "Done!"
+exit 0
diff --git a/source3/librpc/ndr/libndr.h b/source3/librpc/ndr/libndr.h
index 6341e20b65..d0c2c74db9 100644
--- a/source3/librpc/ndr/libndr.h
+++ b/source3/librpc/ndr/libndr.h
@@ -149,7 +149,7 @@ struct ndr_print {
/* set to avoid recursion in ndr_size_*() calculation */
#define LIBNDR_FLAG_NO_NDR_SIZE (1<<31)
-/* useful macro for debugging */
+/* useful macro for debugging with DEBUG */
#define NDR_PRINT_DEBUG(type, p) ndr_print_debug((ndr_print_fn_t)ndr_print_ ##type, #p, p)
#define NDR_PRINT_UNION_DEBUG(type, level, p) ndr_print_union_debug((ndr_print_fn_t)ndr_print_ ##type, #p, level, p)
#define NDR_PRINT_FUNCTION_DEBUG(type, flags, p) ndr_print_function_debug((ndr_print_function_t)ndr_print_ ##type, #type, flags, p)
@@ -157,6 +157,14 @@ struct ndr_print {
#define NDR_PRINT_OUT_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_OUT, p)
#define NDR_PRINT_IN_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_IN | NDR_SET_VALUES, p)
+/* useful macro for debugging in strings */
+#define NDR_PRINT_STRUCT_STRING(ctx, type, p) ndr_print_struct_string(ctx, (ndr_print_fn_t)ndr_print_ ##type, #p, p)
+#define NDR_PRINT_UNION_STRING(ctx, type, level, p) ndr_print_union_string(ctx, (ndr_print_fn_t)ndr_print_ ##type, #p, level, p)
+#define NDR_PRINT_FUNCTION_STRING(ctx, type, flags, p) ndr_print_function_string(ctx, (ndr_print_function_t)ndr_print_ ##type, #type, flags, p)
+#define NDR_PRINT_BOTH_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_BOTH, p)
+#define NDR_PRINT_OUT_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_OUT, p)
+#define NDR_PRINT_IN_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_IN | NDR_SET_VALUES, p)
+
#define NDR_BE(ndr) (((ndr)->flags & (LIBNDR_FLAG_BIGENDIAN|LIBNDR_FLAG_LITTLE_ENDIAN)) == LIBNDR_FLAG_BIGENDIAN)
enum ndr_err_code {
diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c
index 7743269ce0..05269d7711 100644
--- a/source3/rpcclient/cmd_lsarpc.c
+++ b/source3/rpcclient/cmd_lsarpc.c
@@ -916,7 +916,8 @@ static void display_trust_dom_info_4(struct lsa_TrustDomainInfoPassword *p, cons
data_blob_free(&data_old);
}
-static void display_trust_dom_info(union lsa_TrustedDomainInfo *info,
+static void display_trust_dom_info(TALLOC_CTX *mem_ctx,
+ union lsa_TrustedDomainInfo *info,
enum lsa_TrustDomInfoEnum info_class,
const char *pass)
{
@@ -924,12 +925,17 @@ static void display_trust_dom_info(union lsa_TrustedDomainInfo *info,
case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
display_trust_dom_info_4(&info->password, pass);
break;
- default:
- NDR_PRINT_UNION_DEBUG(lsa_TrustedDomainInfo,
- info_class, info);
+ default: {
+ const char *str = NULL;
+ str = NDR_PRINT_UNION_STRING(mem_ctx,
+ lsa_TrustedDomainInfo,
+ info_class, info);
+ if (str) {
+ d_printf("%s\n", str);
+ }
break;
+ }
}
-
}
static NTSTATUS cmd_lsa_query_trustdominfobysid(struct rpc_pipe_client *cli,
@@ -967,7 +973,7 @@ static NTSTATUS cmd_lsa_query_trustdominfobysid(struct rpc_pipe_client *cli,
if (!NT_STATUS_IS_OK(result))
goto done;
- display_trust_dom_info(&info, info_class, cli->pwd.password);
+ display_trust_dom_info(mem_ctx, &info, info_class, cli->pwd.password);
done:
if (&pol)
@@ -1015,7 +1021,7 @@ static NTSTATUS cmd_lsa_query_trustdominfobyname(struct rpc_pipe_client *cli,
if (!NT_STATUS_IS_OK(result))
goto done;
- display_trust_dom_info(&info, info_class, cli->pwd.password);
+ display_trust_dom_info(mem_ctx, &info, info_class, cli->pwd.password);
done:
if (&pol)
@@ -1069,7 +1075,7 @@ static NTSTATUS cmd_lsa_query_trustdominfo(struct rpc_pipe_client *cli,
if (!NT_STATUS_IS_OK(result))
goto done;
- display_trust_dom_info(&info, info_class, cli->pwd.password);
+ display_trust_dom_info(mem_ctx, &info, info_class, cli->pwd.password);
done:
if (&pol)