Print this page
3328 smbutil view does't work with Win2008 and later
requires 1575 untangle libmlrpc ...

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/fs.d/smbclnt/smbutil/smbutil.c
          +++ new/usr/src/cmd/fs.d/smbclnt/smbutil/smbutil.c
↓ open down ↓ 25 lines elided ↑ open up ↑
  26   26   * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  27   27   * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  28   28   * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  29   29   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30   30   * SUCH DAMAGE.
  31   31   */
  32   32  
  33   33  /*
  34   34   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  35   35   * Use is subject to license terms.
       36 + *
       37 + * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  36   38   */
  37   39  
  38   40  #include <sys/param.h>
  39   41  #include <sys/time.h>
  40   42  #include <stdio.h>
  41   43  #include <string.h>
  42   44  #include <unistd.h>
  43   45  #include <stdlib.h>
  44   46  #include <err.h>
  45   47  #include <sysexits.h>
↓ open down ↓ 17 lines elided ↑ open up ↑
  63   65  #define CMDFL_NO_KMOD   0x0001
  64   66  
  65   67  static struct commands {
  66   68          const char      *name;
  67   69          cmd_fn_t        *fn;
  68   70          cmd_usage_t     *usage;
  69   71          int             flags;
  70   72  } commands[] = {
  71   73          {"crypt",       cmd_crypt,      NULL, CMDFL_NO_KMOD},
  72   74          {"help",        cmd_help,       help_usage, CMDFL_NO_KMOD},
       75 +        {"info",        cmd_info,       info_usage, 0},
  73   76          {"login",       cmd_login,      login_usage, 0},
  74   77          {"logout",      cmd_logout,     logout_usage, 0},
  75   78          {"logoutall",   cmd_logoutall,  logoutall_usage, 0},
  76   79          {"lookup",      cmd_lookup,     lookup_usage, CMDFL_NO_KMOD},
  77   80          {"print",       cmd_print,      print_usage, 0},
  78   81          {"status",      cmd_status,     status_usage, CMDFL_NO_KMOD},
  79   82          {"view",        cmd_view,       view_usage, 0},
  80   83          {NULL, NULL, NULL, 0}
  81   84  };
  82   85  
↓ open down ↓ 99 lines elided ↑ open up ↑
 182  185  }
 183  186  
 184  187  static void
 185  188  help(void) {
 186  189          printf("\n");
 187  190          printf(gettext("usage: %s [-hv] subcommand [args]\n"), __progname);
 188  191          printf(gettext("where subcommands are:\n"
 189  192          " crypt         slightly obscure password\n"
 190  193          " help          display help on specified subcommand\n"
 191  194          /* " lc                 display active connections\n" */
      195 +        " info          display server type and version\n"
 192  196          " login         login to specified host\n"
 193  197          " logout        logout from specified host\n"
 194  198          " logoutall     logout all users (requires privilege)\n"
 195  199          " lookup        resolve NetBIOS name to IP address\n"
 196  200          " print         print file to the specified remote printer\n"
 197  201          " status        resolve IP address or DNS name to NetBIOS names\n"
 198  202          " view          list resources on specified host\n"
 199  203          "\n"));
 200  204          exit(1);
 201  205  }
 202  206  
 203  207  void
 204  208  help_usage(void) {
 205  209          printf(gettext("usage: smbutil help command\n"));
 206  210          exit(1);
 207  211  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX