2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 22:35:10 +00:00

cannot -> "unable to" in warning/error messages

This commit is contained in:
Todd C. Miller
2011-05-18 12:41:06 -04:00
parent 6f8cd91928
commit fce0b906eb
12 changed files with 21 additions and 21 deletions

View File

@@ -56,12 +56,12 @@ fwtk_init(struct passwd *pw, char **promptp, sudo_auth *auth)
char resp[128]; /* Response from the server */
if ((confp = cfg_read("sudo")) == (Cfg *)-1) {
warningx(_("cannot read fwtk config"));
warningx(_("unable to read fwtk config"));
return AUTH_FATAL;
}
if (auth_open(confp)) {
warningx(_("cannot connect to authentication server"));
warningx(_("unable to connect to authentication server"));
return AUTH_FATAL;
}

View File

@@ -132,7 +132,7 @@ verify_user(struct passwd *pw, char *prompt)
if (standalone && auth_switch[1].name != NULL) {
audit_failure(NewArgv, "invalid authentication methods");
log_error(0, _("Invalid authentication methods compiled into sudo! "
"You cannot mix standalone and non-standalone authentication."));
"You may mix standalone and non-standalone authentication."));
return -1;
}

View File

@@ -166,14 +166,14 @@ io_nextid(char *iolog_dir, char sessid[7])
}
fd = open(pathbuf, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
if (fd == -1)
log_error(USE_ERRNO, _("cannot open %s"), pathbuf);
log_error(USE_ERRNO, _("unable to open %s"), pathbuf);
lock_file(fd, SUDO_LOCK);
/* Read seq number (base 36). */
nread = read(fd, buf, sizeof(buf));
if (nread != 0) {
if (nread == -1)
log_error(USE_ERRNO, _("cannot read %s"), pathbuf);
log_error(USE_ERRNO, _("unable to read %s"), pathbuf);
id = strtoul(buf, &ep, 36);
if (buf == ep || id >= SESSID_MAX)
log_error(0, _("invalid sequence number %s"), pathbuf);

View File

@@ -447,11 +447,11 @@ sudo_ldap_parse_uri(const struct ldap_config_list_str *uri_list)
if (nldaps != 0) {
if (nldap != 0) {
warningx(_("cannot mix ldap and ldaps URIs"));
warningx(_("unable to mix ldap and ldaps URIs"));
goto done;
}
if (ldap_conf.ssl_mode == SUDO_LDAP_STARTTLS) {
warningx(_("cannot mix ldaps and starttls"));
warningx(_("unable to mix ldaps and starttls"));
goto done;
}
ldap_conf.ssl_mode = SUDO_LDAP_SSL;

View File

@@ -451,14 +451,14 @@ send_mail(const char *fmt, ...)
switch (pid = fork()) {
case -1:
/* Error. */
error(1, _("cannot fork"));
error(1, _("unable to fork"));
break;
case 0:
/* Child. */
switch (pid = fork()) {
case -1:
/* Error. */
mysyslog(LOG_ERR, _("cannot fork: %m"));
mysyslog(LOG_ERR, _("unable to fork: %m"));
_exit(1);
case 0:
/* Grandchild continues below. */
@@ -508,14 +508,14 @@ send_mail(const char *fmt, ...)
(void) sigaction(SIGPIPE, &sa, NULL);
if (pipe(pfd) == -1) {
mysyslog(LOG_ERR, _("cannot open pipe: %m"));
mysyslog(LOG_ERR, _("unable to open pipe: %m"));
_exit(1);
}
switch (pid = fork()) {
case -1:
/* Error. */
mysyslog(LOG_ERR, _("cannot fork: %m"));
mysyslog(LOG_ERR, _("unable to fork: %m"));
_exit(1);
break;
case 0:
@@ -527,7 +527,7 @@ send_mail(const char *fmt, ...)
/* Child, set stdin to output side of the pipe */
if (pfd[0] != STDIN_FILENO) {
if (dup2(pfd[0], STDIN_FILENO) == -1) {
mysyslog(LOG_ERR, _("cannot dup stdin: %m"));
mysyslog(LOG_ERR, _("unable to dup stdin: %m"));
_exit(127);
}
(void) close(pfd[0]);
@@ -561,7 +561,7 @@ send_mail(const char *fmt, ...)
set_perms(PERM_FULL_USER|PERM_NOEXIT);
execv(mpath, argv);
#endif /* NO_ROOT_MAILER */
mysyslog(LOG_ERR, _("cannot execute %s: %m"), mpath);
mysyslog(LOG_ERR, _("unable to execute %s: %m"), mpath);
_exit(127);
}
break;

View File

@@ -889,7 +889,7 @@ check_execv(fd, pid, seqnr, askp, policyp, errorp)
if (rval == -1 || getcwd(user_cwd, sizeof(user_cwd)) == NULL) {
if (rval == -1 && errno == EBUSY)
return -1;
warningx("cannot get working directory");
warningx("unable to get working directory");
(void) strlcpy(user_cwd, "unknown", sizeof(user_cwd));
}

View File

@@ -371,7 +371,7 @@ main(int argc, char *argv[])
if (ch != -1)
(void) fcntl(STDIN_FILENO, F_SETFL, ch | O_NONBLOCK);
if (!term_raw(STDIN_FILENO, 1))
error(1, _("cannot set tty to raw mode"));
error(1, _("unable to set tty to raw mode"));
}
fdsw = (fd_set *)emalloc2(howmany(STDOUT_FILENO + 1, NFDBITS),
sizeof(fd_mask));

View File

@@ -362,7 +362,7 @@ edit_sudoers(struct sudoersfile *sp, char *editor, char *args, int lineno)
* Sanity checks.
*/
if (stat(sp->tpath, &sb) < 0) {
warningx(_("cannot stat temporary file (%s), %s unchanged"),
warningx(_("unable to stat temporary file (%s), %s unchanged"),
sp->tpath, sp->path);
return FALSE;
}

View File

@@ -244,14 +244,14 @@ sudo_execve(struct command_details *details, struct command_status *cstat)
* Parent sends signal info to child and child sends back wait status.
*/
if (socketpair(PF_UNIX, SOCK_DGRAM, 0, sv) == -1)
error(1, _("cannot create sockets"));
error(1, _("unable to create sockets"));
/*
* We use a pipe to atomically handle signal notification within
* the select() loop.
*/
if (pipe_nonblock(signal_pipe) != 0)
error(1, _("cannot create pipe"));
error(1, _("unable to create pipe"));
zero_bytes(&sa, sizeof(sa));
sigemptyset(&sa.sa_mask);

View File

@@ -819,7 +819,7 @@ exec_monitor(struct command_details *details, int backchannel)
* the select() loop.
*/
if (pipe_nonblock(signal_pipe) != 0)
error(1, _("cannot create pipe"));
error(1, _("unable to create pipe"));
/* Reset SIGWINCH and SIGALRM. */
zero_bytes(&sa, sizeof(sa));

View File

@@ -221,7 +221,7 @@ get_net_ifs(char **addrinfo)
sock = socket(AF_INET, SOCK_DGRAM, 0);
if (sock < 0)
error(1, _("cannot open socket"));
error(1, _("unable to open socket"));
/*
* Get interface configuration or return.

View File

@@ -191,7 +191,7 @@ relabel_tty(const char *ttyn, int ptyfd)
/* Reopen pty that was relabeled, std{in,out,err} are reset later. */
se_state.ttyfd = open(ttyn, O_RDWR|O_NOCTTY, 0);
if (se_state.ttyfd == -1) {
warning(_("cannot open %s"), ttyn);
warning(_("unable to open %s"), ttyn);
if (se_state.enforcing)
goto bad;
}