summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fabce34)
SCCS-vsn: usr.sbin/sendmail/src/conf.c 8.31
-static char sccsid[] = "@(#)conf.c 8.30 (Berkeley) %G%";
+static char sccsid[] = "@(#)conf.c 8.31 (Berkeley) %G%";
#endif /* not lint */
# include "sendmail.h"
#endif /* not lint */
# include "sendmail.h"
}
if (!bitset(LOCK_NB, type) || (errno != EACCES && errno != EAGAIN))
}
if (!bitset(LOCK_NB, type) || (errno != EACCES && errno != EAGAIN))
- syserr("cannot lockf(%s%s, fd=%d, type=%o)",
- filename, ext, fd, type);
+ {
+ int omode = -1;
+# ifdef F_GETFL
+ int oerrno = errno;
+
+ (void) fcntl(fd, F_GETFL, &omode);
+ errno = oerrno;
+# endif
+ syserr("cannot lockf(%s%s, fd=%d, type=%o, omode=%o, euid=%d)",
+ filename, ext, fd, type, omode, geteuid());
+ }
# else
if (ext == NULL)
ext = "";
# else
if (ext == NULL)
ext = "";
printf("(%s) ", errstring(errno));
if (!bitset(LOCK_NB, type) || errno != EWOULDBLOCK)
printf("(%s) ", errstring(errno));
if (!bitset(LOCK_NB, type) || errno != EWOULDBLOCK)
- syserr("cannot flock(%s%s, fd=%d, type=%o)",
- filename, ext, fd, type);
+ {
+ int omode = -1;
+# ifdef F_GETFL
+ int oerrno = errno;
+
+ (void) fcntl(fd, F_GETFL, &omode);
+ errno = oerrno;
+# endif
+ syserr("cannot flock(%s%s, fd=%d, type=%o, omode=%o, euid=%d)",
+ filename, ext, fd, type, omode, geteuid());
if (tTd(55, 60))
printf("FAIL\n");
return FALSE;
if (tTd(55, 60))
printf("FAIL\n");
return FALSE;