summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--mactelnetd.c7
-rw-r--r--po/mactelnet.pot69
3 files changed, 46 insertions, 32 deletions
diff --git a/Makefile b/Makefile
index ca64341..15a73c1 100644
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,7 @@ install-docs:
install docs/*.1 $(DESTDIR)/usr/share/man/man1/
po/mactelnet.pot: *.c
- xgettext --package-name=mactelnet --msgid-bugs-address=haakon.nessjoen@gmail.com -d mactelnet -C -k_ -kgettext_noop *.c -o po/mactelnet.pot
+ xgettext --package-name=mactelnet --msgid-bugs-address=haakon.nessjoen@gmail.com -d mactelnet -C -c_ -k_ -kgettext_noop *.c -o po/mactelnet.pot
users.o: users.c users.h
${CC} -Wall ${CFLAGS} -DUSERSFILE='"/etc/mactelnetd.users"' -c users.c
diff --git a/mactelnetd.c b/mactelnetd.c
index a2c0956..1738ce8 100644
--- a/mactelnetd.c
+++ b/mactelnetd.c
@@ -408,6 +408,7 @@ static void user_login(struct mt_connection *curconn, struct mt_mactelnet_hdr *p
if (user == NULL || memcmp(md5sum, curconn->trypassword, 17) != 0) {
syslog(LOG_NOTICE, _("(%d) Invalid login by %s."), curconn->seskey, curconn->username);
+ /*_ Please include both \r and \n in translation, this is needed for the terminal emulator. */
abort_connection(curconn, pkthdr, _("Login failed, incorrect username or password\r\n"));
/* TODO: should wait some time (not with sleep) before returning, to minimalize brute force attacks */
@@ -424,6 +425,7 @@ static void user_login(struct mt_connection *curconn, struct mt_mactelnet_hdr *p
curconn->ptsfd = posix_openpt(O_RDWR);
if (curconn->ptsfd == -1 || grantpt(curconn->ptsfd) == -1 || unlockpt(curconn->ptsfd) == -1) {
syslog(LOG_ERR, "posix_openpt: %s", strerror(errno));
+ /*_ Please include both \r and \n in translation, this is needed for the terminal emulator. */
abort_connection(curconn, pkthdr, _("Terminal error\r\n"));
return;
}
@@ -436,6 +438,7 @@ static void user_login(struct mt_connection *curconn, struct mt_mactelnet_hdr *p
struct passwd *user = (struct passwd *)getpwnam(curconn->username);
if (user == NULL) {
syslog(LOG_WARNING, _("(%d) Login ok, but local user not accessible (%s)."), curconn->seskey, curconn->username);
+ /*_ Please include both \r and \n in translation, this is needed for the terminal emulator. */
abort_connection(curconn, pkthdr, _("Local user not accessible\r\n"));
return;
}
@@ -446,6 +449,7 @@ static void user_login(struct mt_connection *curconn, struct mt_mactelnet_hdr *p
curconn->slavefd = open(slavename, O_RDWR);
if (curconn->slavefd == -1) {
syslog(LOG_ERR, _("Error opening %s: %s"), slavename, strerror(errno));
+ /*_ Please include both \r and \n in translation, this is needed for the terminal emulator. */
abort_connection(curconn, pkthdr, _("Error opening terminal\r\n"));
list_remove_connection(curconn);
return;
@@ -496,6 +500,7 @@ static void user_login(struct mt_connection *curconn, struct mt_mactelnet_hdr *p
/* Set user id/group id */
if ((setgid(user->pw_gid) != 0) || (setuid(user->pw_uid) != 0)) {
syslog(LOG_ERR, _("(%d) Could not log in %s (%d:%d): setuid/setgid: %s"), curconn->seskey, curconn->username, user->pw_uid, user->pw_gid, strerror(errno));
+ /*_ Please include both \r and \n in translation, this is needed for the terminal emulator. */
abort_connection(curconn, pkthdr, _("Internal error\r\n"));
exit(0);
}
@@ -807,6 +812,7 @@ void mndp_broadcast() {
void sigterm_handler() {
struct mt_connection *p;
struct mt_packet pdata;
+ /*_ Please include both \r and \n in translation, this is needed for the terminal emulator. */
char message[] = gettext_noop("\r\n\r\nDaemon shutting down.\r\n");
syslog(LOG_NOTICE, _("Daemon shutting down"));
@@ -1128,6 +1134,7 @@ int main (int argc, char **argv) {
if (now - p->lastdata >= MT_CONNECTION_TIMEOUT) {
syslog(LOG_INFO, _("(%d) Session timed out"), p->seskey);
init_packet(&pdata, MT_PTYPE_DATA, p->dstmac, p->srcmac, p->seskey, p->outcounter);
+ /*_ Please include both \r and \n in translation, this is needed for the terminal emulator. */
add_control_packet(&pdata, MT_CPTYPE_PLAINDATA, _("Timeout\r\n"), 9);
send_udp(p, &pdata);
init_packet(&pdata, MT_PTYPE_END, p->dstmac, p->srcmac, p->seskey, p->outcounter);
diff --git a/po/mactelnet.pot b/po/mactelnet.pot
index a9186cf..415844c 100644
--- a/po/mactelnet.pot
+++ b/po/mactelnet.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mactelnet\n"
"Report-Msgid-Bugs-To: haakon.nessjoen@gmail.com\n"
-"POT-Creation-Date: 2012-02-28 14:38+0100\n"
+"POT-Creation-Date: 2012-02-28 15:15+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -62,7 +62,7 @@ msgstr ""
msgid "Packet size must be between 18 and %d\n"
msgstr ""
-#: macping.c:179 mactelnetd.c:934
+#: macping.c:179 mactelnetd.c:940
#, c-format
msgid "You need to have root privileges to use %s.\n"
msgstr ""
@@ -159,7 +159,7 @@ msgstr ""
msgid "Connecting to %s..."
msgstr ""
-#: mactelnet.c:560 mactelnetd.c:244 mactelnetd.c:975
+#: mactelnet.c:560 mactelnetd.c:244 mactelnetd.c:981
#, c-format
msgid "Error binding to %s:%d, %s\n"
msgstr ""
@@ -184,101 +184,107 @@ msgstr ""
msgid "(%d) Invalid login by %s."
msgstr ""
-#: mactelnetd.c:411
+#. _ Please include both \r and \n in translation, this is needed for the terminal emulator.
+#: mactelnetd.c:412
msgid "Login failed, incorrect username or password\r\n"
msgstr ""
-#: mactelnetd.c:427
+#. _ Please include both \r and \n in translation, this is needed for the terminal emulator.
+#: mactelnetd.c:429
msgid "Terminal error\r\n"
msgstr ""
-#: mactelnetd.c:438
+#: mactelnetd.c:440
#, c-format
msgid "(%d) Login ok, but local user not accessible (%s)."
msgstr ""
-#: mactelnetd.c:439
+#. _ Please include both \r and \n in translation, this is needed for the terminal emulator.
+#: mactelnetd.c:442
msgid "Local user not accessible\r\n"
msgstr ""
-#: mactelnetd.c:448
+#: mactelnetd.c:451
#, c-format
msgid "Error opening %s: %s"
msgstr ""
-#: mactelnetd.c:449
+#. _ Please include both \r and \n in translation, this is needed for the terminal emulator.
+#: mactelnetd.c:453
msgid "Error opening terminal\r\n"
msgstr ""
-#: mactelnetd.c:460
+#: mactelnetd.c:464
#, c-format
msgid "(%d) User %s logged in."
msgstr ""
-#: mactelnetd.c:498
+#: mactelnetd.c:502
#, c-format
msgid "(%d) Could not log in %s (%d:%d): setuid/setgid: %s"
msgstr ""
-#: mactelnetd.c:499
+#. _ Please include both \r and \n in translation, this is needed for the terminal emulator.
+#: mactelnetd.c:504
msgid "Internal error\r\n"
msgstr ""
-#: mactelnetd.c:505
+#: mactelnetd.c:510
#, c-format
msgid "(%d) User %s disconnected with "
msgstr ""
-#: mactelnetd.c:598
+#: mactelnetd.c:603
#, c-format
msgid "(%d) Unhandeled control packet type: %d"
msgstr ""
-#: mactelnetd.c:644
+#: mactelnetd.c:649
#, c-format
msgid "(%d) New connection from %s."
msgstr ""
-#: mactelnetd.c:672 mactelnetd.c:1105
+#: mactelnetd.c:677 mactelnetd.c:1111
#, c-format
msgid "(%d) Connection closed."
msgstr ""
-#: mactelnetd.c:718
+#: mactelnetd.c:723
#, c-format
msgid "(%d) Unhandeled packet type: %d"
msgstr ""
-#: mactelnetd.c:810
+#. _ Please include both \r and \n in translation, this is needed for the terminal emulator.
+#: mactelnetd.c:816
msgid ""
"\r\n"
"\r\n"
"Daemon shutting down.\r\n"
msgstr ""
-#: mactelnetd.c:812
+#: mactelnetd.c:818
msgid "Daemon shutting down"
msgstr ""
-#: mactelnetd.c:843
+#: mactelnetd.c:849
msgid "SIGHUP: Reloading interfaces"
msgstr ""
-#: mactelnetd.c:854
+#: mactelnetd.c:860
msgid "No devices found! Exiting.\n"
msgstr ""
-#: mactelnetd.c:868
+#: mactelnetd.c:874
#, c-format
msgid "(%d) Connection closed because interface %s is gone."
msgstr ""
-#: mactelnetd.c:921
+#: mactelnetd.c:927
#, c-format
msgid "Usage: %s [-f|-n|-h]\n"
msgstr ""
-#: mactelnetd.c:924
+#: mactelnetd.c:930
#, c-format
msgid ""
"\n"
@@ -289,36 +295,37 @@ msgid ""
"\n"
msgstr ""
-#: mactelnetd.c:997
+#: mactelnetd.c:1003
#, c-format
msgid "MNDP: Error binding to %s:%d, %s\n"
msgstr ""
-#: mactelnetd.c:1001
+#: mactelnetd.c:1007
#, c-format
msgid "Bound to %s:%d"
msgstr ""
-#: mactelnetd.c:1027
+#: mactelnetd.c:1033
msgid "Unable to find any valid network interfaces\n"
msgstr ""
-#: mactelnetd.c:1103
+#: mactelnetd.c:1109
#, c-format
msgid "(%d) Connection to user %s closed."
msgstr ""
-#: mactelnetd.c:1113
+#: mactelnetd.c:1119
#, c-format
msgid "(%d) Waiting for ack\n"
msgstr ""
-#: mactelnetd.c:1129
+#: mactelnetd.c:1135
#, c-format
msgid "(%d) Session timed out"
msgstr ""
-#: mactelnetd.c:1131
+#. _ Please include both \r and \n in translation, this is needed for the terminal emulator.
+#: mactelnetd.c:1138
msgid "Timeout\r\n"
msgstr ""