[LTP] [PATCH 1/3] lib: Add SAFE_CHROOT(path) macro

Petr Vorel pvorel@suse.cz
Wed Jun 20 14:26:23 CEST 2018


Hi Cyril,

> > +++ b/include/safe_macros_fn.h
> > @@ -30,6 +30,9 @@ char* safe_basename(const char *file, const int lineno,
> >  int safe_chdir(const char *file, const int lineno,
> >                 void (*cleanup_fn)(void), const char *path);

> > +int safe_chroot(const char *file, const int lineno,
> > +               void (*cleanup_fn)(void), const char *path);

> Can we pretty please avoid adding the function prototypes with the
> unused cleanup pointer?

> The safe_macros_fn.h file exists only for a historical reasons, new safe
> macros should be added to the tst_safe_macros.h file only, both macro
> and function prototype should go there.

Sure. I'm sorry, for not carefully checking my patches.
I created this part long time ago and I this is exactly what I fixed in Jinhui
Huang's SAFE_GETGRNAM patchset.


Kind regards,
Petr


More information about the ltp mailing list