check argc and show usage if no args

This commit is contained in:
Andrew Tridgell
1998-05-13 07:04:40 +00:00
parent 4cdf25e42e
commit df5e03da7b

5
main.c
View File

@@ -494,6 +494,11 @@ int main(int argc,char *argv[])
starttime = time(NULL);
am_root = (getuid() == 0);
if (argc < 2) {
usage(FERROR);
exit(1);
}
/* we set a 0 umask so that correct file permissions can be
carried across */
orig_umask = (int)umask(0);