summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-03-02 09:55:31 -0700
committerVolker Lendecke <vlendec@samba.org>2011-03-02 18:39:21 +0100
commitdee53e04ba1b0da27aa94c84842edf00d8da901e (patch)
treed49fbb53f163553c1de42031bc0b2ba0892703e0 /source3/client
parenta5aecdf3610ea5febea5c85607c5f9192e9073e6 (diff)
downloadsamba-dee53e04ba1b0da27aa94c84842edf00d8da901e.tar.gz
samba-dee53e04ba1b0da27aa94c84842edf00d8da901e.tar.bz2
samba-dee53e04ba1b0da27aa94c84842edf00d8da901e.zip
s3: Print all flags in "smbclient allinfo"
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index c7dfaa1cb4..e979f74fa4 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);