X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=command.c;h=a84d3b867d23a1e98b25eb5ea6799378029f8095;hb=9be5a49b2b24d49de40f87f9aba3378dd04a7b0e;hp=212a1800e1a32726096c3461c05ee2e9a3bacbfb;hpb=024a12e75bea8695a02e2abb43eb0d77cb04f144;p=paraslash.git diff --git a/command.c b/command.c index 212a1800..a84d3b86 100644 --- a/command.c +++ b/command.c @@ -6,21 +6,25 @@ /** \file command.c does client authentication and executes server commands */ -#include /* gettimeofday */ -#include "para.h" /* gettimeofday */ +#include +#include +#include +#include +#include +#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 -#include "error.h" #include "net.h" #include "daemon.h" -#include "string.h" #include "fd.h" #include "list.h" #include "user_list.h" @@ -217,7 +221,7 @@ static int check_sender_args(int argc, char * const * argv, struct sender_comman 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) { @@ -230,7 +234,7 @@ static int check_sender_args(int argc, char * const * argv, struct sender_comman 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) {