From: Andrew Tridgell Date: Sun, 26 Dec 2004 08:41:11 +0000 (+0000) Subject: r4365: added command 'eainfo' to smbclient for displaying binary EA contents X-Git-Tag: samba-4.0.0alpha6~801^3~12223 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=6c4d5917e148819384271d2960c3f6ccca2e5b54 r4365: added command 'eainfo' to smbclient for displaying binary EA contents (This used to be commit 268edcdb4a95240662102faef4126449f286d49d) --- diff --git a/source4/client/client.c b/source4/client/client.c index ce0efe6fb60..802c4a7a91a 100644 --- a/source4/client/client.c +++ b/source4/client/client.c @@ -1746,12 +1746,10 @@ static int cmd_allinfo(const char **cmd_ptr) if (NT_STATUS_IS_OK(status)) { int i; for (i=0;i\n"); + return 1; + } + pstrcat(fname,buf); + + mem_ctx = talloc_init("%s", fname); + + finfo.generic.in.fname = fname; + finfo.generic.level = RAW_FILEINFO_ALL_EAS; + status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo); + + if (!NT_STATUS_IS_OK(status)) { + d_printf("RAW_FILEINFO_ALL_EAS - %s\n", nt_errstr(status)); + talloc_destroy(mem_ctx); + return 1; + } + + d_printf("%s has %d EAs\n", fname, finfo.all_eas.out.num_eas); + + for (i=0;i delete a whole directory tree",{COMPL_REMOTE,COMPL_NONE}}, {"dir",cmd_dir," list the contents of the current directory",{COMPL_REMOTE,COMPL_NONE}}, {"du",cmd_du," computes the total size of the current directory",{COMPL_REMOTE,COMPL_NONE}}, + {"eainfo",cmd_eainfo," show EA contents for a file",{COMPL_NONE,COMPL_NONE}}, {"exit",cmd_quit,"logoff the server",{COMPL_NONE,COMPL_NONE}}, {"get",cmd_get," [local name] get a file",{COMPL_REMOTE,COMPL_LOCAL}}, {"help",cmd_help,"[command] give help on a command",{COMPL_NONE,COMPL_NONE}},