@@ -73,9 +73,8 @@ static int
posix_permissions(const acl_header *header, int entries, int *extra, int *mode) {
int acl_seen = 0;
if (le32(header->version) != 2) {
- pseudo_diag("Fatal: ACL support no available for header version %d.\n",
+ pseudo_critical("ACL support no available for header version %d.\n",
le32(header->version));
- return 1;
}
*mode = 0;
*extra = 0;
@@ -89,7 +89,7 @@
break;
#endif
default:
- pseudo_diag("unknown fcntl argument %d, assuming long argument.\n",
+ pseudo_error("unknown fcntl argument %d, assuming long argument.\n",
cmd);
rc = real_fcntl(fd, cmd, arg);
break;
@@ -89,7 +89,7 @@
break;
#endif
default:
- pseudo_diag("unknown fcntl64 argument %d, assuming long argument.\n",
+ pseudo_error("unknown fcntl64 argument %d, assuming long argument.\n",
cmd);
rc = real_fcntl64(fd, cmd, arg);
break;
@@ -12,7 +12,7 @@
static char pwbuf[PSEUDO_PWD_MAX];
struct passwd *pwp;
- pseudo_diag("warning: unsafe getpw() called. hoping buf has at least %d chars.\n",
+ pseudo_warning("unsafe getpw() called. hoping buf has at least %d chars.\n",
PSEUDO_PWD_MAX);
rc = wrap_getpwuid_r(uid, &pwd, pwbuf, PSEUDO_PWD_MAX, &pwp);
/* different error return conventions */
@@ -112,9 +112,8 @@
* stack to stuff that's going to try to drop the lock.
*/
if (pseudo_getlock()) {
- pseudo_diag("PANIC: after opening a readonly/writeonly FIFO (path '%s', fd %d, errno %d, saved errno %d), could not regain lock. unrecoverable. sorry. bye.\n",
+ pseudo_critical("after opening a readonly/writeonly FIFO (path '%s', fd %d, errno %d, saved errno %d), could not regain lock. unrecoverable. sorry. bye.\n",
path, rc, errno, save_errno);
- abort();
}
errno = save_errno;
}
@@ -147,9 +147,8 @@
* stack to stuff that's going to try to drop the lock.
*/
if (pseudo_getlock()) {
- pseudo_diag("PANIC: after opening a readonly/writeonly FIFO (path '%s', fd %d, errno %d, saved errno %d), could not regain lock. unrecoverable. sorry. bye.\n",
+ pseudo_critical("PANIC: after opening a readonly/writeonly FIFO (path '%s', fd %d, errno %d, saved errno %d), could not regain lock. unrecoverable. sorry. bye.\n",
pseudo_path, rc, errno, save_errno);
- abort();
}
errno = save_errno;
}
@@ -66,9 +66,8 @@ static int
posix_permissions(const acl_header *header, int entries, int *extra, int *mode) {
int acl_seen = 0;
if (le32(header->version) != 2) {
- pseudo_diag("Fatal: ACL support not available for header version %d.\n",
+ pseudo_critical("Fatal: ACL support not available for header version %d.\n",
le32(header->version));
- return -1;
}
*mode = 0;
*extra = 0;
@@ -11,7 +11,7 @@
pseudo_debug(PDBGF_CLIENT, "wrap_getcwd: %p, %lu\n",
(void *) buf, (unsigned long) size);
if (!pseudo_cwd) {
- pseudo_diag("Asked for CWD, but don't have it!\n");
+ pseudo_error("Asked for CWD, but don't have it!\n");
errno = EACCES;
return NULL;
}
@@ -33,13 +33,13 @@
if (size) {
buf = malloc(size);
} else {
- pseudo_diag("can't figure out CWD: length %ld + 1 - %ld => %ld\n",
+ pseudo_error("can't figure out CWD: length %ld + 1 - %ld => %ld\n",
(unsigned long) pseudo_cwd_len,
(unsigned long) pseudo_chroot_len,
(unsigned long) size);
}
if (!buf) {
- pseudo_diag("couldn't allocate requested CWD buffer - need %ld byes\n",
+ pseudo_error("couldn't allocate requested CWD buffer - need %ld byes\n",
(unsigned long) size);
errno = ENOMEM;
return NULL;
@@ -82,7 +82,7 @@
rc2 = base_lstat(oldpath, &buf);
}
if (rc2 == -1) {
- pseudo_diag("Fatal: Tried to stat '%s' after linking it, but failed: %s.\n",
+ pseudo_error("Fatal: Tried to stat '%s' after linking it, but failed: %s.\n",
oldpath, strerror(errno));
errno = ENOENT;
return rc2;
@@ -68,7 +68,7 @@ static void NFTW_DELETE_FN_NAME() {
NFTW_STORAGE_ARRAY_NAME = NULL;
--NFTW_STORAGE_ARRAY_SIZE;
} else {
- pseudo_diag("%s: Invalid callback storage content, can't find corresponding data", __func__);
+ pseudo_error("%s: Invalid callback storage content, can't find corresponding data", __func__);
}
return;
}
@@ -82,7 +82,7 @@ static void NFTW_DELETE_FN_NAME() {
}
if (found_idx == -1) {
- pseudo_diag("%s: Invalid callback storage content, can't find corresponding data", __func__);
+ pseudo_error("%s: Invalid callback storage content, can't find corresponding data", __func__);
return;
}
@@ -102,7 +102,7 @@ static int NFTW_CALLBACK_NAME(const char* fpath, const struct NFTW_STAT_STRUCT _
struct NFTW_STAT_STRUCT pseudo_sb;
if (!NFTW_FIND_FN_NAME(&saved_details)) {
- pseudo_diag("%s: Could not find corresponding callback!", __func__);
+ pseudo_error("%s: Could not find corresponding callback!", __func__);
return -1;
}
@@ -38,7 +38,7 @@
#endif
if (rc == -1) {
int save_errno = errno;
- pseudo_diag("symlinkat: couldn't stat '%s' even though symlink creation succeeded (%s).\n",
+ pseudo_warning("symlinkat: couldn't stat '%s' even though symlink creation succeeded (%s).\n",
newpath, strerror(errno));
errno = save_errno;
free(roldname);
@@ -11,7 +11,7 @@
/* let gcc know we ignored these on purpose */
(void) template;
(void) pfx;
- pseudo_diag("tempnam() is so ludicrously insecure as to defy implementation.");
+ pseudo_warning("tempnam() is so ludicrously insecure as to defy implementation.");
errno = ENOMEM;
rc = NULL;
@@ -11,7 +11,7 @@
/* let gcc know we're ignoring this */
(void) s;
- pseudo_diag("tmpnam() is so ludicrously insecure as to defy implementation.");
+ pseudo_warning("tmpnam() is so ludicrously insecure as to defy implementation.");
errno = ENOMEM;
rc = NULL;
@@ -23,7 +23,7 @@
* with that flag unless the real AT functions exist, so
* something must have gone horribly wrong....
*/
- pseudo_diag("wrap_unlinkat called with flags (0x%x), path '%s'\n",
+ pseudo_info("wrap_unlinkat called with flags (0x%x), path '%s'\n",
rflags, path ? path : "<nil>");
errno = ENOSYS;
return -1;
@@ -165,7 +165,7 @@ pseudo_msg_receive(int fd) {
if (!incoming || header.pathlen >= incoming_pathlen) {
newmsg = pseudo_msg_new(header.pathlen + 128, 0);
if (!newmsg) {
- pseudo_diag("Couldn't allocate header for path of %d bytes.\n",
+ pseudo_error("Couldn't allocate header for path of %d bytes.\n",
(int) header.pathlen);
return 0;
}
@@ -249,7 +249,7 @@ pseudo_magic() {
static void
pseudo_enosys(const char *func) {
- pseudo_diag("pseudo: ENOSYS for '%s'.\n", func ? func : "<nil>");
+ pseudo_info("pseudo: ENOSYS for '%s'.\n", func ? func : "<nil>");
char * value = pseudo_get_value("PSEUDO_ENOSYS_ABORT");
if (value)
abort();