corecode/dma

Command alias "newaliases"

Closed this issue · 1 comments

Hello,

dma/dma.c

Lines 467 to 474 in 14ea7d7

} else if (strcmp(argv[0], "newaliases") == 0) {
logident_base = "dma";
setlogident(NULL);
if (read_aliases() != 0)
errx(EX_SOFTWARE, "could not parse aliases file `%s'", config.aliases);
exit(EX_OK);
}

Is this command alias still necessary (I don't see it being created by make)? If so, it should also use basename(3) like for "mailq" (see below). At the moment the check doesn't work for it being run as for example ./newaliases or/path/to/newaliases

Compare to:

dma/dma.c

Line 461 in 14ea7d7

if (strcmp(basename(argv[0]), "mailq") == 0) {

I think having the alias is useful, because some systems expect newaliases to exist. Those systems can easily create a symlink.

I agree that we should use basename.