Created attachment 122012 [details] patch taken from running pm-functions; also fixes comment typo The function run_hooks() in pm-functions proposes to-be-executed hooks that includes subdirectories in the hook directories but neither fully validates each such hook as a regular file nor handles a set of to-be-executed hooks in a subdirectory. This can cause a hook to be executed more than once. At lines 241 on, there is a code path with no else clause: if [ -f "$syshooks/$base" ]; then hook="$syshooks/$base" elif [ -f "$phooks/$base" ]; then hook="$phooks/$base" fi If the $base proposed by the for statement at line 229 doesn't match either of the -f tests (which will happen eg if a hook is configured in a subdirectory of the hook directory), the $hook from the previous iteration can be accidentally reused. An easy fix is to insert the missing else clause before the fi line so that the script skips the subdirectory or other non-regular file and carries on with the next correctly specified hook, as in the attached patch.
Created attachment 122013 [details] [review] patch taken from running pm-functions; also fixes comment typo (attached wrong file)
pm-utils hasn't been touched in eight years, none of this is likely to get addressed. Closing bugs and disabling the bz product.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.