/** \file command.c does client authentication and executes server commands */
-#include <sys/time.h> /* gettimeofday */
-#include "para.h" /* gettimeofday */
+#include <signal.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <openssl/rc4.h>
+#include "para.h"
+#include "error.h"
#include "server.cmdline.h"
#include "afs_common.h"
+#include "string.h"
#include "afh.h"
+#include "afs.h"
#include "server.h"
#include "vss.h"
#include "send.h"
#include "rc4.h"
-#include <openssl/rc4.h>
-#include "error.h"
#include "net.h"
#include "daemon.h"
-#include "string.h"
#include "fd.h"
#include "list.h"
#include "user_list.h"
case SENDER_ALLOW:
if (argc != 4 && argc != 5)
return -E_COMMAND_SYNTAX;
- if (!inet_aton(argv[3], &scd->addr))
+ if (!inet_pton(AF_INET, argv[3], &scd->addr))
return -E_COMMAND_SYNTAX;
scd->netmask = 32;
if (argc == 5) {
case SENDER_DELETE:
if (argc != 4 && argc != 5)
return -E_COMMAND_SYNTAX;
- if (!inet_aton(argv[3], &scd->addr))
+ if (!inet_pton(AF_INET, argv[3], &scd->addr))
return -E_COMMAND_SYNTAX;
scd->port = -1;
if (argc == 5) {
if (!strcmp(cmd->name, name))
return cmd;
/* not found, look for commands supported by afs */
- for (cmd = afs_cmds; cmd; cmd++)
+ for (cmd = afs_cmds; cmd->name; cmd++)
if (!strcmp(cmd->name, name))
return cmd;
return NULL;
if (ret < 0)
return ret;
cmd = afs_cmds;
- ret = send_list_of_commands(fd, cmd, "afs");
+ return send_list_of_commands(fd, cmd, "afs");
}
/* argument given for help */
cmd = get_cmd_ptr(argv[1], &handler);