<pre style='margin:0'>
Clemens Lang (neverpanic) pushed a commit to branch master
in repository macports-base.

</pre>
<p><a href="https://github.com/macports/macports-base/commit/9cc9afcac32b7b2228358c417ebdf4e2f7655118">https://github.com/macports/macports-base/commit/9cc9afcac32b7b2228358c417ebdf4e2f7655118</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 9cc9afcac32b7b2228358c417ebdf4e2f7655118
</span>Author: Clemens Lang <cal@macports.org>
AuthorDate: Fri Feb 19 02:25:21 2021 +0100

<span style='display:block; white-space:pre;color:#404040;'>    pextlib1.0: Fix check for SUID/SGID binaries
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    The S_ISUID and S_ISGID bits are in the st_mode field of the stat
</span><span style='display:block; white-space:pre;color:#404040;'>    struct, not in the st_flags field. This caused our check for SUID/SGID
</span><span style='display:block; white-space:pre;color:#404040;'>    binaries to be incorrect, which caused us to copy SUID/SGID binaries
</span><span style='display:block; white-space:pre;color:#404040;'>    into the sip-workaround directory, where they would then not run
</span><span style='display:block; white-space:pre;color:#404040;'>    (correctly) because they did not have the permissions required.
</span>---
 src/pextlib1.0/sip_copy_proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/pextlib1.0/sip_copy_proc.c b/src/pextlib1.0/sip_copy_proc.c
</span><span style='display:block; white-space:pre;color:#808080;'>index 233c48f9c..e7b5c4009 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/pextlib1.0/sip_copy_proc.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/pextlib1.0/sip_copy_proc.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -230,7 +230,7 @@ static copy_needed_return_t copy_needed(const char *path, char *const argv[],
</span>             free_argv(new_argv);
             return copy_not_needed;
         }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-        if ((st->st_flags & (S_ISUID | S_ISGID)) > 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        if ((st->st_mode & (S_ISUID | S_ISGID)) > 0) {
</span>             // the binary is SUID/SGID, which would get lost when copying;
             // DYLD_ variables are stripped for SUID/SGID binaries anyway
             free_argv(new_argv);
</pre><pre style='margin:0'>

</pre>