Explorar el Código

Check for extra command line arguments

Otherwise, excluded domains might be silently ignored.
tags/1.1
Timo Röhling hace 11 años
padre
commit
ea35d05dcf
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4
    0
      postsrsd.c

+ 4
- 0
postsrsd.c Ver fichero

@@ -307,6 +307,10 @@ int main (int argc, char **argv)
307 307
         return EXIT_SUCCESS;
308 308
     }
309 309
   }
310
+  if (optind < argc) {
311
+    fprintf (stderr, "%s: extra argument on command line: %s\n", self, argv[optind]);
312
+    return EXIT_FAILURE;
313
+  }
310 314
   if (domain == NULL) {
311 315
     fprintf (stderr, "%s: You must set a home domain (-d)\n", self);
312 316
     return EXIT_FAILURE;

Loading…
Cancelar
Guardar