Skip to content

Instantly share code, notes, and snippets.

@johnlettman
Last active August 4, 2023 18:30
Show Gist options
  • Save johnlettman/62bf9ef720fdf24b6b1c1f39299db685 to your computer and use it in GitHub Desktop.
Save johnlettman/62bf9ef720fdf24b6b1c1f39299db685 to your computer and use it in GitHub Desktop.
Juju: GameOver(lay) CVE-2023-2640 and CVE-2023-32629 patcher
@guimaluf
Copy link

guimaluf commented Aug 4, 2023

at L60-71, if grep fails to find a match it will throw exit code 1 and the if will fail
I've changed to

                grep \
                    -qsE '''kernel\.unprivileged_userns_clone[[:space:]]*=[[:space:]]*0''' \
                    /etc/sysctl.d/* ;
                echo $?

grep will be silent, printing no output and the result of the command will be consistent with the output pattern 1 if fail, 0 if it found the line on sysctl.d/*

@johnlettman
Copy link
Author

@guimaluf Fabulous! Thank you. I've incorporated your change into the gist. 👍

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