Bugzilla – Bug 358
Crash in sudo's setenv() when _var_ == NULL
Last modified: 2009-06-15 09:13:04 MDT
Similar to bug #348 I got a bug reported that happens with pam_mount module set up. The problem seems to be that it passes an empty var, probably by mistake on the module's side, but still might be worth to harden sudo do accept that case too. Thanks in advance, Diego
I've committed a change to make setenv() return EINVAL if var is NULL or empty which will be present in sudo 1.7.2. I really think that checking for NULL in functions that take a string is a bad idea since it hides bugs in the code that calls it. However, since there seems to be code that relies on this behavior I suppose there's not a better option.