Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package blog for openSUSE:Factory checked in 
at 2026-04-25 21:35:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/blog (Old)
 and      /work/SRC/openSUSE:Factory/.blog.new.11940 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "blog"

Sat Apr 25 21:35:20 2026 rev:25 rq:1349094 version:2.40

Changes:
--------
--- /work/SRC/openSUSE:Factory/blog/blog.changes        2026-04-16 
17:25:22.639497950 +0200
+++ /work/SRC/openSUSE:Factory/.blog.new.11940/blog.changes     2026-04-25 
21:35:28.977163119 +0200
@@ -1,0 +2,20 @@
+Fri Apr 24 07:49:36 UTC 2026 - Dr. Werner Fink <[email protected]>
+
+- Update to version 2.40
+  * Protect password data stream on 3270 console as well 
+    On S390 the 3270 console is also logged and the passwords,
+    even if hidden on the 3270 console, would be logged as well.
+
+-------------------------------------------------------------------
+Wed Apr 22 13:38:59 UTC 2026 - Dr. Werner Fink <[email protected]>
+
+- Update to version 2.39
+  * New feature to protect passwords to be logged
+    On S390 now blogd use for 3215 console the command
+       #CP SPOOL CONSOLE STOP
+    to stop logging the plain password at prompting for the password.
+    Also a warning is written out to warn the user that the password
+    will be visible. With getting the password the CONSOLE log is
+    enabled again if it was enabled before.
+
+-------------------------------------------------------------------

Old:
----
  showconsole-2.38.tar.gz

New:
----
  showconsole-2.40.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ blog.spec ++++++
--- /var/tmp/diff_new_pack.4FtzSc/_old  2026-04-25 21:35:29.661190953 +0200
+++ /var/tmp/diff_new_pack.4FtzSc/_new  2026-04-25 21:35:29.661190953 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           blog
-Version:        2.38
+Version:        2.40
 %define sonum   2
 Release:        0
 Summary:        Boot logging

++++++ showconsole-2.38.tar.gz -> showconsole-2.40.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/showconsole-2.38/Makefile 
new/showconsole-2.40/Makefile
--- old/showconsole-2.38/Makefile       2026-04-13 14:11:49.000000000 +0200
+++ new/showconsole-2.40/Makefile       2026-04-24 09:28:22.000000000 +0200
@@ -15,7 +15,7 @@
 DEBUG   =
 DESTDIR         =
 MAJOR   :=     2
-MINOR   :=     38
+MINOR   :=     40
 VERSION         :=     $(MAJOR).$(MINOR)
 DATE    =      $(shell date +'%d%b%y' | tr '[:lower:]' '[:upper:]')
 COPTS    =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/showconsole-2.38/blogd.c new/showconsole-2.40/blogd.c
--- old/showconsole-2.38/blogd.c        2026-04-13 14:11:49.000000000 +0200
+++ new/showconsole-2.40/blogd.c        2026-04-24 09:28:22.000000000 +0200
@@ -353,7 +353,7 @@
 
            if (timeout && isinteger(timeout)) {
                int vmcp = openvmcp();
-               if (vmcp) {
+               if (vmcp >=0) {
                    char *msg = queryterm(vmcp);
                    if (msg) {
                        parseterm(msg);
@@ -650,8 +650,11 @@
 static void vmcp_handler (void)
 {
     int vmcp = openvmcp();
-    if (vmcp >= 0)
+    if (vmcp >= 0) {
        restoreterm(vmcp);
-    close(vmcp);
+       restorespool(vmcp);
+       clearvmcp();
+       close(vmcp);
+    }
 }
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/showconsole-2.38/libconsole/console.c 
new/showconsole-2.40/libconsole/console.c
--- old/showconsole-2.38/libconsole/console.c   2026-04-13 14:11:49.000000000 
+0200
+++ new/showconsole-2.40/libconsole/console.c   2026-04-24 09:28:22.000000000 
+0200
@@ -1627,6 +1627,7 @@
            char *message;
            int eightbit;
            int len, fdc, tflags;
+           int vmcpfd = -1;
 
            if (fdfifo >= 0)
                close(fdfifo);
@@ -1694,7 +1695,27 @@
        again:
            clear_input(0);
 #if defined(__s390__) || defined(__s390x__)
+           if (c->flags & (CON_3215|CON_3270)) {
+               vmcpfd = openvmcp();
+               if (vmcpfd >= 0) {
+                   char *msg = queryspool(vmcpfd);
+                   if (msg) {
+                       parsespool(msg);
+                       free(msg);
+                   }
+                   stopspool(vmcpfd);
+               }
+           }
            if (c->flags & CON_3215) {
+               if (vmcpfd >= 0) {
+                   char *msg = queryterm(vmcpfd);
+                   if (msg) {
+                       parseterm(msg);
+                       free(msg);
+                   }
+                   setterm(vmcpfd, "0");
+                   warning3215(vmcpfd);
+               }
                /*
                 * The 3215 console MUST have a trailing newline.
                 * Otherwise the half-duplex driver won't flush the write buffer
@@ -1775,6 +1796,17 @@
            tcsetattr(0, TCSANOW, &c->ctio);
            safeout(1, "\n", 1, c->max_canon);
 
+#if defined(__s390__) || defined(__s390x__)
+           if (vmcpfd >= 0) {
+               if (c->flags & CON_3215)
+                   restoreterm(vmcpfd);
+               if (c->flags & (CON_3215|CON_3270))
+                   restorespool(vmcpfd);
+               clearvmcp();
+               close(vmcpfd);
+               vmcpfd = -1;
+           }
+#endif
            if (*pwsize == 0)
                goto again;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/showconsole-2.38/libconsole/libconsole.h 
new/showconsole-2.40/libconsole/libconsole.h
--- old/showconsole-2.38/libconsole/libconsole.h        2026-04-13 
14:11:49.000000000 +0200
+++ new/showconsole-2.40/libconsole/libconsole.h        2026-04-24 
09:28:22.000000000 +0200
@@ -215,10 +215,16 @@
 #if defined(__s390__) || defined(__s390x__)
 extern int isinteger(const char *str);
 extern int openvmcp(void);
+extern void clearvmcp(void);
 extern char* queryterm(int fd);
+extern char* queryspool(int fd);
 extern int setterm(int fd, char *tout);
+extern int stopspool(int fd);
 extern int restoreterm(int fd);
+extern int restorespool(int fd);
 extern void parseterm(char *msg);
+extern void parsespool(char *msg);
+extern void warning3215(int fd);
 #endif
 
 #define MAX_PASSLEN    LINE_MAX
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/showconsole-2.38/libconsole/vmcp.c 
new/showconsole-2.40/libconsole/vmcp.c
--- old/showconsole-2.38/libconsole/vmcp.c      2026-04-13 14:11:49.000000000 
+0200
+++ new/showconsole-2.40/libconsole/vmcp.c      2026-04-24 09:28:22.000000000 
+0200
@@ -1,5 +1,9 @@
 /*
- * vmcp.c
+ * SPDX-License-Identifier: MIT
+ *
+ * vmcp.c - s390x 3215 console spool and terminal management
+ *
+ * Copyright 2026 Werner Fink, SUSE Software Solutions Germany GmbH
  *
  * Based on:
  *
@@ -50,14 +54,28 @@
     return ret;
 }
 
+static char *more, *hold;
+static int spooling;
+
 int openvmcp(void)
 {
     return open(VMCP_DEVICE_NODE, O_RDWR|O_NOCTTY);
 }
 
-char* queryterm(int fd)
+void clearvmcp(void)
+{
+    if (more) {
+       free(more);
+       more = NULL;
+    }
+    if (hold) {
+       free(hold);
+       hold = NULL;
+    }
+}
+
+static char* askvmcp(int fd, const char *question)
 {
-    const char* question = "QUERY TERMINAL";
     long pagesize = sysconf(_SC_PAGESIZE);
     int rc = 0, num, buffersize;
     char* ret = NULL;
@@ -92,16 +110,24 @@
     return ret;
 }
 
-int setterm(int fd, char *tout)
+char* queryterm(int fd)
+{
+    const char* question = "QUERY TERMINAL";
+    return askvmcp(fd, question);
+}
+
+char* queryspool(int fd)
+{
+    const char* question = "QUERY VIRTUAL CONSOLE";
+    return askvmcp(fd, question);
+}
+
+static int writevmcp(int fd, char *instruction)
 {
-    char *instruction;
     long pagesize = sysconf(_SC_PAGESIZE);
     int rc = 0, num, buffersize;
     int ret = -1;
 
-    if (asprintf(&instruction, "TERMINAL MORE %s 0 HOLD OFF", tout) == -1)
-       goto out;
-
     num = (strlen(instruction) + pagesize - 1)/pagesize;
     buffersize = num * pagesize;
 
@@ -114,7 +140,6 @@
                goto out;
        }
     } while (rc < 0);
-    free(instruction);
     if (ioctl(fd, VMCP_GETCODE, &rc) == -1)
        goto out;
     if (ioctl(fd, VMCP_GETSIZE, &buffersize) == -1)
@@ -125,13 +150,23 @@
     return ret;
 }
 
-static char *more, *hold;
+int setterm(int fd, char *tout)
+{
+    char *instruction;
+    int ret = -1;
+
+    if (asprintf(&instruction, "TERMINAL MORE %s 0 HOLD OFF", tout) == -1)
+       goto out;
+
+    ret = writevmcp(fd, instruction);
+    free(instruction);
+out:
+    return ret;
+}
 
 int restoreterm(int fd)
 {
     char* instruction;
-    long pagesize = sysconf(_SC_PAGESIZE);
-    int rc = 0, num, buffersize;
     int ret = -1;
 
     if (!more || !hold)
@@ -139,29 +174,28 @@
     if (asprintf(&instruction, "TERMINAL %s %s", more, hold) == -1)
        goto out;
 
-    num = (strlen(instruction) + pagesize - 1)/pagesize;
-    buffersize = num * pagesize;
-
-    if (ioctl(fd, VMCP_SETBUF, &buffersize) == -1)
-       goto out;
-    do {
-       rc = write(fd, instruction, strlen(instruction));
-       if (rc < 0) {
-           if (errno != EINTR)
-               goto out;
-       }
-    } while (rc < 0);
+    ret = writevmcp(fd, instruction);
     free(instruction);
-    if (ioctl(fd, VMCP_GETCODE, &rc) == -1)
-       goto out;
-    if (ioctl(fd, VMCP_GETSIZE, &buffersize) == -1)
-       goto out;
-    if (rc == 0 && buffersize == 0)
-       ret = 0;
 out:
     return ret;
 }
 
+int stopspool(int fd)
+{
+    char* instruction = "SPOOL CONSOLE STOP";
+    if (!spooling)
+       return 1;
+    return writevmcp(fd, instruction);
+}
+
+int restorespool(int fd)
+{
+    char* instruction = "SPOOL CONSOLE START";
+    if (!spooling)
+       return 1;
+    return writevmcp(fd, instruction);
+}
+
 void parseterm(char *msg)
 {
     int n;
@@ -180,4 +214,17 @@
            hold = strdup(token);
     }
 }
+
+void parsespool(char *msg)
+{
+    spooling = 0;
+    if (strstr(msg, " TERM START ") != NULL)
+       spooling = 1;
+}
+
+void warning3215(int fd)
+{
+    (void) writevmcp(fd, "MESSAGE * WARNING: 3215 mode. Password visible!");
+    (void) writevmcp(fd, "MESSAGE * Ensure nobody is watching the screen.");
+}
 #endif

Reply via email to