Oh, dear. This is a long-standing bug, and a bad one for systems which
don't set per-user $TMPDIR directories.
- if (stat(sockdir, &st)) {
+ if (lstat(sockdir, &st)) {
if (errno == ENOENT) {
if (mkdir(sockdir, 0700)) {
perror("noip: creating socketdir");
exit(127);
}
if (errno == ENOENT) {
if (mkdir(sockdir, 0700)) {
perror("noip: creating socketdir");
exit(127);
}
- if (!stat(sockdir, &st))
+ if (!lstat(sockdir, &st))
goto check;
}
perror("noip: checking socketdir");
goto check;
}
perror("noip: checking socketdir");