From dee53e04ba1b0da27aa94c84842edf00d8da901e Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 2 Mar 2011 09:55:31 -0700 Subject: [PATCH] s3: Print all flags in "smbclient allinfo" --- source3/client/client.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/source3/client/client.c b/source3/client/client.c index c7dfaa1cb47..e979f74fa44 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -1605,6 +1605,30 @@ static char *attr_str(TALLOC_CTX *mem_ctx, uint16_t mode) int i = 0; if (!(mode & FILE_ATTRIBUTE_NORMAL)) { + if (mode & FILE_ATTRIBUTE_ENCRYPTED) { + attrs[i++] = 'E'; + } + if (mode & FILE_ATTRIBUTE_NONINDEXED) { + attrs[i++] = 'N'; + } + if (mode & FILE_ATTRIBUTE_OFFLINE) { + attrs[i++] = 'O'; + } + if (mode & FILE_ATTRIBUTE_COMPRESSED) { + attrs[i++] = 'C'; + } + if (mode & FILE_ATTRIBUTE_REPARSE_POINT) { + attrs[i++] = 'r'; + } + if (mode & FILE_ATTRIBUTE_SPARSE) { + attrs[i++] = 's'; + } + if (mode & FILE_ATTRIBUTE_TEMPORARY) { + attrs[i++] = 'T'; + } + if (mode & FILE_ATTRIBUTE_NORMAL) { + attrs[i++] = 'N'; + } if (mode & FILE_ATTRIBUTE_READONLY) { attrs[i++] = 'R'; } @@ -1672,7 +1696,7 @@ static int do_allinfo(const char *name) unix_timespec_to_nt_time(&tmp, c_time); d_printf("change_time: %s\n", nt_time_string(talloc_tos(), tmp)); - d_printf("attributes: %s\n", attr_str(talloc_tos(), mode)); + d_printf("attributes: %s (%x)\n", attr_str(talloc_tos(), mode), mode); status = cli_qpathinfo_streams(cli, name, talloc_tos(), &num_streams, &streams); -- 2.34.1