[systemd-devel] [RFC 11/25] shared/missing.h: fall pack to insecure getenv

Karol Lewandowski k.lewandowsk at samsung.com
Thu Sep 18 06:56:42 PDT 2014


On 2014-09-18 15:24, Emil Renner Berthing wrote:
> ---
>  src/shared/missing.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/shared/missing.h b/src/shared/missing.h
> index b441149..8389c28 100644
> --- a/src/shared/missing.h
> +++ b/src/shared/missing.h
> @@ -353,7 +353,7 @@ static inline int name_to_handle_at(int fd, const char *name, struct file_handle
>  #  ifdef HAVE___SECURE_GETENV
>  #    define secure_getenv __secure_getenv
>  #  else
> -#    error "neither secure_getenv nor __secure_getenv are available"
> +#    define secure_getenv getenv

I think it would be way better (and easy) to reimplement original
secure_getenv() rather than falling back to function with different
semantics.  secure_ is there for a reason.

Cheers,
-- 
Karol Lewandowski, Samsung R&D Institute Poland


More information about the systemd-devel mailing list