Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GlobaLeaks does not output any error messages from init script's log_action_end_msg() #1199

Open
fpietrosanti opened this issue Mar 15, 2015 · 1 comment

Comments

Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
@fpietrosanti
Copy link
Collaborator

@fpietrosanti fpietrosanti commented Mar 15, 2015

It has been detected by an adopter that GlobaLeaks does not output any error messages from init script's log_action_end_msg() .

This problem has been detected on Ubuntu Precise:
root@globaLeaksXXX:/etc/init.d# uname -a
Linux globaLeaksXXX 2.6.32-20-pve #1 SMP Wed May 15 08:23:27 CEST 2013 i686 i686 i386 GNU/Linux
root@globaLeaksXXX:/etc/init.d# cat /etc/debian_version
wheezy/sid

Please note that this bug has been verified to affect also Tor init script, where log_action_end_msg is executed but no output is shown in console.

This very same bug ticket has been opened on Tor https://trac.torproject.org/projects/tor/ticket/15274

The adopter reported usr the following patch to init script has been proposed as a workdaround to the section related to Apparmor error handling, by using "echo" instead of log_action_end_msg LSB function.

    if [ "${APPARMOR_SANDBOXING}" -eq "1" ]; then
        APPARMOR_STARTED=0
        #
        # moved following message up to show users that apparmor config
is starting
        # so in case of error we'll know what's going on
        #
        log_action_begin_msg "Enabling GlobaLeaks Apparmor Sandboxing"

        test -x /usr/sbin/aa-status \
            && test -x /usr/sbin/aa-exec \
            && test -e /etc/apparmor.d/usr.bin.globaleaks \
            && /usr/sbin/aa-status --enabled \
            && STARTCMD="/usr/sbin/aa-exec --profile=usr.bin.globaleaks
-- $STARTCMD" \

        # We don't need it here. If apparmor fails this message won't
never be shown

            #&& echo "Enabling GlobaLeaks Apparmor Sandboxing" \
            && APPARMOR_STARTED=1

        if [ "${APPARMOR_STARTED}" -eq "0" ]; then
        # show [fail] message
          log_action_end_msg 1
        # Give more info about fail
          echo "Unable to initialized AppArmor! AppArmor is probably
disabled, please enable it by following instructions at
https://wiki.debian.org/AppArmor/HowToUse"
          exit 1
        fi
    fi

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@fpietrosanti
Copy link
Collaborator Author

@fpietrosanti fpietrosanti commented Mar 18, 2015

It has been verified that the function log_action_end_msg not providing output it's a matter of /etc/default/rcS settings VERBOSE=no by default.

We shall test if we can override this settings from within the init script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment