diff options
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index f275dddd8b..7dc412fe3a 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -1526,6 +1526,31 @@ static int cmd_altname(void) return 0; } +static char *attr_str(TALLOC_CTX *mem_ctx, uint16_t mode) +{ + char *attrs = TALLOC_ZERO_ARRAY(mem_ctx, char, 17); + int i = 0; + + if (!(mode & FILE_ATTRIBUTE_NORMAL)) { + if (mode & FILE_ATTRIBUTE_READONLY) { + attrs[i++] = 'R'; + } + if (mode & FILE_ATTRIBUTE_HIDDEN) { + attrs[i++] = 'H'; + } + if (mode & FILE_ATTRIBUTE_SYSTEM) { + attrs[i++] = 'S'; + } + if (mode & FILE_ATTRIBUTE_DIRECTORY) { + attrs[i++] = 'D'; + } + if (mode & FILE_ATTRIBUTE_ARCHIVE) { + attrs[i++] = 'A'; + } + } + return attrs; +} + /**************************************************************************** Show all info we can get ****************************************************************************/ @@ -1568,6 +1593,8 @@ 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)); + if (!cli_qpathinfo_streams(cli, name, talloc_tos(), &num_streams, &streams)) { d_printf("%s getting streams for %s\n", |