소스 검색

Check for extra command line arguments

Otherwise, excluded domains might be silently ignored.
tags/1.1
Timo Röhling 12 년 전
부모
커밋
ea35d05dcf
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4
    0
      postsrsd.c

+ 4
- 0
postsrsd.c 파일 보기

307
         return EXIT_SUCCESS;
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
   if (domain == NULL) {
314
   if (domain == NULL) {
311
     fprintf (stderr, "%s: You must set a home domain (-d)\n", self);
315
     fprintf (stderr, "%s: You must set a home domain (-d)\n", self);
312
     return EXIT_FAILURE;
316
     return EXIT_FAILURE;

Loading…
취소
저장