The branch, v3-2-test has been updated
       via  2972c97e5e676964585de930601f083c19080735 (commit)
      from  d70ddad2e8fc2f533fb9211223c172c25878254e (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 2972c97e5e676964585de930601f083c19080735
Author: Karolin Seeger <[EMAIL PROTECTED]>
Date:   Thu Oct 18 13:00:46 2007 +0200

    Add net rap file user

-----------------------------------------------------------------------

Summary of changes:
 source/libsmb/clirap2.c |    5 ++++-
 source/utils/net_rap.c  |   24 ++++++++++++++++++------
 2 files changed, 22 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libsmb/clirap2.c b/source/libsmb/clirap2.c
index 2311300..b8fe31a 100644
--- a/source/libsmb/clirap2.c
+++ b/source/libsmb/clirap2.c
@@ -1021,7 +1021,10 @@ int cli_NetFileGetInfo(struct cli_state *cli, uint32 
file_id, void (*fn)(const c
 *             False     - failure
 *
 ****************************************************************************/
-int cli_NetFileEnum(struct cli_state *cli, char * user, char * base_path, void 
(*fn)(const char *, const char *, uint16, uint16, uint32))
+int cli_NetFileEnum(struct cli_state *cli, const char * user,
+                   const char * base_path,
+                   void (*fn)(const char *, const char *, uint16, uint16,
+                              uint32))
 {
   char *rparam = NULL;
   char *rdata = NULL;
diff --git a/source/utils/net_rap.c b/source/utils/net_rap.c
index 74eda61..b4de374 100644
--- a/source/utils/net_rap.c
+++ b/source/utils/net_rap.c
@@ -108,11 +108,23 @@ static int rap_file_info(int argc, const char **argv)
 
 static int rap_file_user(int argc, const char **argv)
 {
+       struct cli_state *cli;
+       int ret;
+
        if (argc == 0)
                return net_rap_file_usage(argc, argv);
 
-       d_fprintf(stderr, "net rap file user not implemented yet\n");
-       return -1;
+       if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
+               return -1;
+
+       /* list open files */
+
+       d_printf("\nEnumerating open files on remote server:\n\n"
+                "\nFileId  Opened by            Perms  Locks  Path \n"
+                "------  ---------            -----  -----  ---- \n");
+       ret = cli_NetFileEnum(cli, argv[0], NULL, file_fn);
+       cli_shutdown(cli);
+       return ret;
 }
 
 int net_rap_file(int argc, const char **argv)
@@ -132,10 +144,10 @@ int net_rap_file(int argc, const char **argv)
                         return -1;
 
                /* list open files */
-               d_printf(
-                "\nEnumerating open files on remote server:\n\n"\
-                "\nFileId  Opened by            Perms  Locks  Path \n"\
-                "------  ---------            -----  -----  ---- \n");
+
+               d_printf("\nEnumerating open files on remote server:\n\n"
+                        "\nFileId  Opened by            Perms  Locks  Path \n"
+                        "------  ---------            -----  -----  ---- \n");
                ret = cli_NetFileEnum(cli, NULL, NULL, file_fn);
                cli_shutdown(cli);
                return ret;


-- 
Samba Shared Repository

Reply via email to