• GCC 8.3 compiler warnings on CentOS 8

    From James Digriz@1:123/755 to All on Wed Sep 2 17:59:46 2020
    Anyone else tried compiling on 8? Goes to completion but I'm getting piles of warnings about string truncation and such. Eg:

    .
    .
    .

    log.c: In function ‘dolastlog’:
    log.c:89:2: warning: ‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation]
    strncpy(newlog.ll_line, line, sizeof newlog.ll_line);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    gcc -O2 -fno-strict-aliasing -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes
    -D_REENTRANT -I/usr/local/include -c setugid.c
    gcc -O2 -fno-strict-aliasing -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes
    -D_REENTRANT -I/usr/local/include -c mblogin.c
    In file included from mblogin.c:32:
    mblogin.c: In function ‘main’:
    mblogin.c:541:44: warning: ‘%s’ directive output may be truncated writing up to 8191 bytes into a region of size 507 [-Wformat-truncation=]
    snprintf(fromhost, sizeof fromhost, _(" on `%s' from `%s'"), tty, cp);
    ^~~~~~~~~~~~~~~~~~~~
    .
    .
    .

    Presumably this might be something to be concerned about, but I haven't tried running the resulting code yet, and won't run it as a production system until somebody with more current gcc knowledge than mine weighs in.

    Appreciate any input,
    jbdigriz


    Greetings, James Digriz
    email: jbdigriz@bbs.dragonsweb.org

    --- MBSE BBS v1.0.7.18 (GNU/Linux-x86_64)
    * Origin: DragonsWeb Labs BBS 1:123/755 (1:123/755)
  • From James Digriz@1:123/755 to James Digriz on Wed Sep 2 18:39:31 2020
    James Digriz wrote to All:
    Anyone else tried compiling on 8? Goes to completion but I'm getting piles of
    warnings about string truncation and such. Eg:

    Ok, I see Vince has already opened a ticket on this issue for 1.0.7 on Mageia V8 X64 with gcc-8.4. I'm compiling 1.0.7.18-git from today.

    I'm guessing there's no real problem, but you'd have to audit the code for all the warnings to see if there's any real cause for concern. Nice weekend project, heh. I need to get up to speed on gcc-8+ to make any sense of them, myself, but I would like to hear from anyone who's gotten warnings and ran the code.


    Greetings, James Digriz
    email: jbdigriz@bbs.dragonsweb.org

    --- MBSE BBS v1.0.7.18 (GNU/Linux-x86_64)
    * Origin: DragonsWeb Labs BBS 1:123/755 (1:123/755)
  • From Vincent Coen@2:250/1 to James Digriz on Thu Sep 3 12:59:51 2020
    Hello James!

    Wednesday September 02 2020 18:39, you wrote to you:

    James Digriz wrote to All:
    Anyone else tried compiling on 8? Goes to completion but I'm
    getting piles of warnings about string truncation and such. Eg:

    Ok, I see Vince has already opened a ticket on this issue for 1.0.7 on Mageia V8 X64 with gcc-8.4. I'm compiling 1.0.7.18-git from today.

    I'm guessing there's no real problem, but you'd have to audit the code
    for all the warnings to see if there's any real cause for concern.
    Nice weekend project, heh. I need to get up to speed on gcc-8+ to make
    any sense of them, myself, but I would like to hear from anyone who's
    gotten warnings and ran the code.


    I am running the code at least for 1.0.7.17 with a large amount of warnings.


    The problem is the code was done for older versions of the gcc compiler such as
    v4 and as time and versions have come out the warning count has increased.

    I guess no one knows enough about the compiler and mbse to do some fixes as I suspect that if a few is dealt with the rest will also be dealt with as they are all similar.


    Vincent

    --- Mageia Linux v7.1 X64/Mbse v1.0.7.13/GoldED+/LNX 1.1.5-b20180707
    * Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1)
  • From Andrew Leary@1:320/219 to James Digriz on Fri Sep 4 03:16:11 2020
    Hello James!

    02 Sep 20 17:59, you wrote to all:

    Anyone else tried compiling on 8? Goes to completion but I'm getting
    piles of warnings about string truncation and such. Eg:

    These warnings are because of changes in the newer versions of GCC. They have already been reported, and will be addressed in the future as time permits.

    Regards,

    Andrew

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: Phoenix BBS * phoenix.bnbbbs.net (1:320/219)
  • From James Digriz@1:123/755 to Andrew Leary on Fri Sep 4 11:14:58 2020
    Andrew Leary wrote to James Digriz:


    Anyone else tried compiling on 8? Goes to completion but I'm getting piles of warnings about string truncation and such. Eg:

    These warnings are because of changes in the newer versions of GCC. They have
    already been reported, and will be addressed in the future as time permits.

    Yes, and thanks to all who replied! Now I just have to write a *$#%! systemd unit file to get it running. ;-)

    jbdigriz

    Greetings, James Digriz
    email: jbdigriz@bbs.dragonsweb.org

    --- MBSE BBS v1.0.7.18 (GNU/Linux-x86_64)
    * Origin: DragonsWeb Labs BBS 1:123/755 (1:123/755)
  • From James Digriz@1:123/755 to Vincent Coen on Fri Sep 4 11:38:21 2020
    Vincent Coen wrote to James Digriz:
    .
    .
    .


    I am running the code at least for 1.0.7.17 with a large amount of warnings.


    Ok, if you're not having any issues can I disregard the warnings for now.


    The problem is the code was done for older versions of the gcc compiler such
    as
    v4 and as time and versions have come out the warning count has increased.


    Right, these are more like warnings of *potential* issues for cases where bounds checking is either more relevant or is being done on a different basis than the compiler now expects.

    I guess no one knows enough about the compiler and mbse to do some fixes as I
    suspect that if a few is dealt with the rest will also be dealt with as they
    are all similar.


    At least there don't appear to any real problems in the code beyond annoying the compiler. I'll weigh in with more if and when I get a chance to study this at length.

    Thanks,
    jbdigriz


    Greetings, James Digriz
    email: jbdigriz@bbs.dragonsweb.org

    --- MBSE BBS v1.0.7.18 (GNU/Linux-x86_64)
    * Origin: DragonsWeb Labs BBS 1:123/755 (1:123/755)
  • From Vincent Coen@2:250/1 to James Digriz on Fri Sep 4 17:05:45 2020
    Hello James!

    Friday September 04 2020 11:14, you wrote to Andrew Leary:

    Andrew Leary wrote to James Digriz:


    Anyone else tried compiling on 8? Goes to completion but I'm
    getting
    piles of warnings about string truncation and such. Eg:

    These warnings are because of changes in the newer versions of
    GCC. They have already been reported, and will be addressed in
    the future as time permits.

    Yes, and thanks to all who replied! Now I just have to write a *$#%!
    systemd unit file to get it running. ;-)

    No you don't.

    In my system and in relation to reading the manual I have in directory
    xinetd.d a file called mbsebbs and the content is :

    --------------
    #:MBSE BBS services are defined here.
    #
    # Author: Michiel Broek <mbse@mbse.eu>, 27-Sep-2004

    service binkp
    {
    socket_type = stream
    protocol = tcp
    wait = no
    user = mbse
    instances = 10
    server = /home/mbse/bin/mbcico
    server_args = -t ibn
    }

    service fido
    {
    socket_type = stream
    protocol = tcp
    wait = no
    user = mbse
    instances = 10
    server = /home/mbse/bin/mbcico
    server_args = -t ifc
    }

    service tfido
    {
    socket_type = stream
    protocol = tcp
    wait = no
    user = mbse
    instances = 10
    server = /home/mbse/bin/mbcico
    server_args = -t itn
    }

    # Telnet to the bbs using mblogin, disabled by default.
    #
    service telnet
    {
    disable = yes
    protocol = tcp
    instances = 10
    flags = REUSE
    log_on_failure += USERID
    socket_type = stream
    user = root
    server = /usr/sbin/telnetd
    server_args = -L /home/mbse/bin/mblogin
    wait = no
    }

    service nntp
    {
    socket_type = stream
    disable = no
    protocol = tcp
    instances = 10
    wait = no
    user = mbse
    server = /home/mbse/bin/mbnntp
    server_args = mbnntp

    -----------

    I have a lot of files for doing different tasks so you might have 2 - 5 etc.

    Now my home directory for mbse, is at /home and NOT /opt

    This can be set up using ./configure --prefix=/home


    The reason is that if I decide to load up another distro held on my system drives which can be a DASD or a SSD I do not have to reinstall and copy over the content of mbse which in my case is over 16Gb - well over.
    { Also my system has links to a IBM m/f environment etc so it starts adding up as to all of the changes required for each distro - bit of a pain ! }

    Then checking the end of that pass to ensure it will load it all up in /home/mbse before moving forwards in the build.





    Vincent

    --- Mageia Linux v7.1 X64/Mbse v1.0.7.17/GoldED+/LNX 1.1.5-b20180707
    * Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1)
  • From James Digriz@1:123/755 to Vincent Coen on Fri Sep 4 14:21:47 2020
    Vincent Coen wrote to James Digriz:

    <cut>


    Yes, and thanks to all who replied! Now I just have to write a *$#%! systemd unit file to get it running. ;-)

    No you don't.

    In my system and in relation to reading the manual I have in directory xinetd.d a file called mbsebbs and the content is :


    <cut file>


    I have a lot of files for doing different tasks so you might have 2 - 5 etc.

    Now my home directory for mbse, is at /home and NOT /opt

    This can be set up using ./configure --prefix=/home


    Yes, I'm using the same setup. For some reason, though, the start script didn't
    work at first. Of course, after I made my comment, it now works. <shrug>. Something called systemd-sysv-generator apparently lets the mbsed init scripts operate correctly.


    The reason is that if I decide to load up another distro held on my system drives which can be a DASD or a SSD I do not have to reinstall and copy over
    the content of mbse which in my case is over 16Gb - well over.
    { Also my system has links to a IBM m/f environment etc so it starts adding up
    as to all of the changes required for each distro - bit of a pain ! }

    Then checking the end of that pass to ensure it will load it all up in /home/mbse before moving forwards in the build.


    Kewl. Are you running Hercules or are you on real iron?

    jbdigriz


    Greetings, James Digriz
    email: jbdigriz@bbs.dragonsweb.org

    --- MBSE BBS v1.0.7.18 (GNU/Linux-x86_64)
    * Origin: DragonsWeb Labs BBS 1:123/755 (1:123/755)
  • From Vincent Coen@2:250/1 to James Digriz on Sat Sep 5 00:43:05 2020
    Hello James!

    Friday September 04 2020 14:21, you wrote to me:

    The reason is that if I decide to load up another distro held on
    my system drives which can be a DASD or a SSD I do not have to
    reinstall and copy over the content of mbse which in my case is
    over 16Gb - well over. { Also my system has links to a IBM m/f
    environment etc so it starts adding up as to all of the changes
    required for each distro - bit of a pain ! }

    Then checking the end of that pass to ensure it will load it all
    up in /home/mbse before moving forwards in the build.


    Kewl. Are you running Hercules or are you on real iron?

    Both to allow for MVS, OS390, zOS and *nix.


    Vincent

    --- Mageia Linux v7.1 X64/Mbse v1.0.7.17/GoldED+/LNX 1.1.5-b20180707
    * Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1)
  • From Andrew Leary@1:320/219 to James Digriz on Sat Sep 5 01:51:20 2020
    Hello James!

    04 Sep 20 14:21, you wrote to Vincent Coen:

    Yes, I'm using the same setup. For some reason, though, the start
    script didn't work at first. Of course, after I made my comment, it
    now works. <shrug>. Something called systemd-sysv-generator apparently lets the mbsed init scripts operate correctly.

    It is on the TO DO list to make the install scripts interface directly with systemd systems.

    I also just recently corrected the Debian and Devuan install scripts to include the LSB information so that the BBS can be configured to auto start when the machine boots.

    Andrew

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: Phoenix BBS * phoenix.bnbbbs.net (1:320/219)
  • From James Digriz@1:123/755 to Andrew Leary on Sun Sep 6 17:51:47 2020
    Andrew Leary wrote to James Digriz:
    Hello James!

    04 Sep 20 14:21, you wrote to Vincent Coen:

    Yes, I'm using the same setup. For some reason, though, the start script didn't work at first. Of course, after I made my comment, it now works. <shrug>. Something called systemd-sysv-generator
    apparently
    lets the mbsed init scripts operate correctly.

    It is on the TO DO list to make the install scripts interface directly with
    systemd systems.

    I also just recently corrected the Debian and Devuan install scripts to include the LSB information so that the BBS can be configured to auto start
    when the machine boots.

    Andrew

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: Phoenix BBS * phoenix.bnbbbs.net (1:320/219)


    I'm really on the point of backing up and punting. Go to Devuan or some other Linux distro that does not use systemd. Or maybe a BSD.

    Here's what happened: I've been running MBSE integrated with my virtualmin setup. Works fine, and it even works fine with systemd if you MANUALLY bind mount /home on /var/www (with appropriate httpd.conf mods, etc.), which has to be done with CentOS 8 as the virtualmin crew has dropped support for custom suexec and expects scripts to be run with app handlers through httpd proxies. Eg. PHP-FPM. Cgi is deprecated now according to the Lords of Web Design. Since that means restricting scripts to php unless and until there are suitable handlers for python, ruby, etc. etc. I want to keep my options open and thus the bind mount trick. Not the most secure probably and I'm looking at bindfs for a similar remedy not involving root access, but it'll do for now.

    The problem is that the much-vaunted systemd house of kludges thinks it is smarter than the system administrator and reorders your fstab entries, leading,
    in this case, to an unbootable system because it tries to mount /home before the root fs. I'm sorry, I'm just fscking tired of this crap. And having to wait
    2 major releases or more before simple things just work like they're supposed to. And not having a recognizable Unix system that works the way it's suppoed to any more. The hell with the dumb
    shit. I refuse to waste my time coming up with yet another unit file just make some lunatic's quest for world domination not fall flat on its face.

    I'm outta there.

    jbdigriz ('scuse the rant. MBSE rocks!)



    Greetings, James Digriz
    email: jbdigriz@bbs.dragonsweb.org

    --- MBSE BBS v1.0.7.18 (GNU/Linux-x86_64)
    * Origin: DragonsWeb Labs BBS 1:123/755 (1:123/755)
  • From James Digriz@1:123/755 to Vincent Coen on Sun Sep 6 17:56:21 2020
    Vincent Coen wrote to James Digriz:


    Kewl. Are you running Hercules or are you on real iron?

    Both to allow for MVS, OS390, zOS and *nix.


    Vincent


    Sweet. I wish I had the room and power to run a mainframe.

    jbdigriz


    Greetings, James Digriz
    email: jbdigriz@bbs.dragonsweb.org

    --- MBSE BBS v1.0.7.18 (GNU/Linux-x86_64)
    * Origin: DragonsWeb Labs BBS 1:123/755 (1:123/755)
  • From Vincent Coen@2:250/1 to James Digriz on Mon Sep 7 13:01:33 2020
    Hello James!

    Sunday September 06 2020 17:56, you wrote to me:

    Vincent Coen wrote to James Digriz:


    Kewl. Are you running Hercules or are you on real iron?

    Both to allow for MVS, OS390, zOS and *nix.


    Vincent


    Sweet. I wish I had the room and power to run a mainframe.

    Get a multiverse 3000 single phase but will not fit in a cupboard !


    Vincent

    --- Mageia Linux v7.1 X64/Mbse v1.0.7.17/GoldED+/LNX 1.1.5-b20180707
    * Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1)