Prepare sudo front end messages for translation.
This commit is contained in:
18
src/exec.c
18
src/exec.c
@@ -234,7 +234,7 @@ sudo_execve(struct command_details *details, struct command_status *cstat)
|
||||
if (!ISSET(details->flags, CD_BACKGROUND)) {
|
||||
if (ISSET(details->flags, CD_SET_UTMP))
|
||||
utmp_user = details->utmp_user ? details->utmp_user : user_details.username;
|
||||
sudo_debug(8, "allocate pty for I/O logging");
|
||||
sudo_debug(8, _("allocate pty for I/O logging"));
|
||||
pty_setup(details->euid, user_details.tty, utmp_user);
|
||||
}
|
||||
}
|
||||
@@ -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, _("cannot 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, _("cannot create pipe"));
|
||||
|
||||
zero_bytes(&sa, sizeof(sa));
|
||||
sigemptyset(&sa.sa_mask);
|
||||
@@ -317,7 +317,7 @@ sudo_execve(struct command_details *details, struct command_status *cstat)
|
||||
if (nready == -1) {
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
error(1, "select failed");
|
||||
error(1, _("select failed"));
|
||||
}
|
||||
if (FD_ISSET(sv[0], fdsw)) {
|
||||
forward_signals(sv[0]);
|
||||
@@ -354,7 +354,7 @@ sudo_execve(struct command_details *details, struct command_status *cstat)
|
||||
if (cstat->type == CMD_WSTATUS) {
|
||||
if (WIFSTOPPED(cstat->val)) {
|
||||
/* Suspend parent and tell child how to resume on return. */
|
||||
sudo_debug(8, "child stopped, suspending parent");
|
||||
sudo_debug(8, _("child stopped, suspending parent"));
|
||||
n = suspend_parent(WSTOPSIG(cstat->val));
|
||||
schedule_signal(n);
|
||||
continue;
|
||||
@@ -385,7 +385,7 @@ sudo_execve(struct command_details *details, struct command_status *cstat)
|
||||
if (ISSET(details->flags, CD_RBAC_ENABLED)) {
|
||||
/* This is probably not needed in log_io mode. */
|
||||
if (selinux_restore_tty() != 0)
|
||||
warningx("unable to restore tty label");
|
||||
warningx(_("unable to restore tty label"));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -426,12 +426,12 @@ handle_signals(int fd, pid_t child, int log_io, struct command_status *cstat)
|
||||
/* If pipe is empty, we are done. */
|
||||
if (errno == EAGAIN)
|
||||
break;
|
||||
sudo_debug(9, "error reading signal pipe %s", strerror(errno));
|
||||
sudo_debug(9, _("error reading signal pipe %s"), strerror(errno));
|
||||
cstat->type = CMD_ERRNO;
|
||||
cstat->val = errno;
|
||||
return -1;
|
||||
}
|
||||
sudo_debug(9, "received signal %d", signo);
|
||||
sudo_debug(9, _("received signal %d"), signo);
|
||||
if (signo == SIGCHLD) {
|
||||
/*
|
||||
* If logging I/O, child is the intermediate process,
|
||||
@@ -496,7 +496,7 @@ forward_signals(int sock)
|
||||
|
||||
while (!tq_empty(&sigfwd_list)) {
|
||||
sigfwd = tq_first(&sigfwd_list);
|
||||
sudo_debug(9, "sending signal %d to child over backchannel",
|
||||
sudo_debug(9, _("sending signal %d to child over backchannel"),
|
||||
sigfwd->signo);
|
||||
cstat.type = CMD_SIGNO;
|
||||
cstat.val = sigfwd->signo;
|
||||
|
Reference in New Issue
Block a user