- WARN ((stderr, "%s: %s is set-group-ID on execution - ignored\n",
- program_name, ifname));
- close (ifd);
- return;
- }
- if (istat.st_mode & S_ISVTX)
- {
- WARN ((stderr, "%s: %s has the sticky bit set - file ignored\n",
- program_name, ifname));
- close (ifd);
- return;
- }
+ if (! S_ISREG (istat.st_mode))
+ {
+ WARN ((stderr,
+ "%s: %s is not a directory or a regular file - ignored\n",
+ program_name, ifname));
+ close (ifd);
+ return;
+ }
+ if (istat.st_mode & S_ISUID)
+ {
+ WARN ((stderr, "%s: %s is set-user-ID on execution - ignored\n",
+ program_name, ifname));
+ close (ifd);
+ return;
+ }
+ if (istat.st_mode & S_ISGID)
+ {
+ WARN ((stderr, "%s: %s is set-group-ID on execution - ignored\n",
+ program_name, ifname));
+ close (ifd);
+ return;
+ }