/*
* Copyright (c) 2000, Boris Popov
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Boris Popov.
* 4. Neither the name of the author nor the names of any co-contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <err.h>
#include <sysexits.h>
#include <locale.h>
#include <libintl.h>
#include "common.h"
#ifndef EX_DATAERR
#endif
static void help(void);
typedef void cmd_usage_t (void);
static struct commands {
const char *name;
int flags;
} commands[] = {
};
static struct commands *
{
return (cmd);
}
return (NULL);
}
int
{
if (argc < 2)
else
return (0);
}
int
{
char *cp;
if (argc < 2)
help_usage();
return (0);
}
int
{
char *cp;
(void) textdomain(TEXT_DOMAIN);
#ifdef APPLE
dropsuid(); /* see libsmbfs */
#endif
if (argc < 2)
help();
switch (opt) {
case 'd':
smb_debug++;
break;
case 'h':
help();
/* NOTREACHED */
case 'v':
smb_verbose++;
break;
default:
help();
/* NOTREACHED */
}
}
help();
exit(1);
optind = 1;
return ((err) ? 1 : 0);
}
static void
help(void) {
printf("\n");
" crypt slightly obscure password\n"
" help display help on specified subcommand\n"
/* " lc display active connections\n" */
" login login to specified host\n"
" logout logout from specified host\n"
" logoutall logout all users (requires privilege)\n"
" lookup resolve NetBIOS name to IP address\n"
" print print file to the specified remote printer\n"
" status resolve IP address or DNS name to NetBIOS names\n"
" view list resources on specified host\n"
"\n"));
exit(1);
}
void
help_usage(void) {
exit(1);
}