/* Define to 1 if you have the `freeifaddrs' function. */
#undef HAVE_FREEIFADDRS
-/* Define to 1 if you have the `fstat' function. */
-#undef HAVE_FSTAT
-
/* Define to 1 if you have the `futime' function. */
#undef HAVE_FUTIME
fi
LIBS=$ac_save_LIBS
-for ac_func in strrchr sysconf tzset strftime fstat \
+for ac_func in strrchr sysconf tzset strftime \
regcomp setlocale nl_langinfo getaddrinfo mbr_check_membership \
setrlimit64 sysctl
do :
dnl Function checks
dnl
AC_FUNC_GETGROUPS
-AC_CHECK_FUNCS(strrchr sysconf tzset strftime fstat \
+AC_CHECK_FUNCS(strrchr sysconf tzset strftime \
regcomp setlocale nl_langinfo getaddrinfo mbr_check_membership \
setrlimit64 sysctl)
AC_REPLACE_FUNCS(getgrouplist)
ssize_t nread; /* number of bytes read */
struct stat sb; /* stat buffer */
-#ifdef HAVE_FSTAT
if (fstat(sp->fd, &sb) == -1)
-#else
- if (stat(sp->path, &sb) == -1)
-#endif
error(1, _("unable to stat %s"), sp->path);
orig_size = sb.st_size;
mtim_get(&sb, &orig_mtim);
*/
if (oldperms) {
/* Use perms of the existing file. */
-#ifdef HAVE_FSTAT
if (fstat(sp->fd, &sb) == -1)
-#else
- if (stat(sp->path, &sb) == -1)
-#endif
error(1, _("unable to stat %s"), sp->path);
if (chown(sp->tpath, sb.st_uid, sb.st_gid) != 0) {
warning(_("unable to set (uid, gid) of %s to (%u, %u)"),
}
}
/* Check mode and owner in strict mode. */
-#ifdef HAVE_FSTAT
- if (strict && yyin != stdin && fstat(fileno(yyin), &sb) == 0)
-#else
- if (strict && yyin != stdin && stat(sudoers_path, &sb) == 0)
-#endif
- {
+ if (strict && yyin != stdin && fstat(fileno(yyin), &sb) == 0) {
if (sb.st_uid != SUDOERS_UID || sb.st_gid != SUDOERS_GID) {
error = TRUE;
if (!quiet) {
zero_bytes(&sb, sizeof(sb)); /* new file */
rc = 0;
} else {
-#ifdef HAVE_FSTAT
rc = fstat(ofd, &sb);
-#else
- rc = stat(tf[j].ofile, &sb);
-#endif
}
}
switch_user(ROOT_UID, user_details.egid,
* to determine whether or not a file has been modified.
*/
(void) touch(tfd, NULL, &tf[j].omtim);
-#ifdef HAVE_FSTAT
rc = fstat(tfd, &sb);
-#else
- rc = stat(tf[j].tfile, &sb);
-#endif
if (!rc)
mtim_get(&sb, &tf[j].omtim);
close(tfd);
if (seteuid(user_details.uid) != 0)
error(1, "seteuid(%d)", (int)user_details.uid);
if ((tfd = open(tf[i].tfile, O_RDONLY, 0644)) != -1) {
-#ifdef HAVE_FSTAT
rc = fstat(tfd, &sb);
-#else
- rc = stat(tf[i].tfile, &sb);
-#endif
}
if (seteuid(ROOT_UID) != 0)
error(1, "seteuid(ROOT_UID)");