瀏覽代碼

Check for extra command line arguments

Otherwise, excluded domains might be silently ignored.
tags/1.1
Timo Röhling 11 年之前
父節點
當前提交
ea35d05dcf
共有 1 個檔案被更改,包括 4 行新增0 行删除
  1. 4
    0
      postsrsd.c

+ 4
- 0
postsrsd.c 查看文件

@@ -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…
取消
儲存