search for: cap_init

Displaying 2 results from an estimated 2 matches for "cap_init".

2004 Jan 26
1
patch for linux capabilities
...,0) failed", (int) uid); + io_printf(f_out, "@ERROR: setreuid failed\n"); + return -1; + } + if( prctl(PR_SET_KEEPCAPS, 1) < 0 ) { + rsyserr(FERROR, errno, "prctl failed"); + io_printf(f_out, "@ERROR: prctl failed\n"); + return -1; + } + if( (cp = cap_init()) == NULL ) { + rsyserr(FERROR, errno, "cap_init failed"); + io_printf(f_out, "@ERROR: cap_init failed\n"); + return -1; + } + if( cap_set_flag(cp, CAP_PERMITTED, 2, newcaps, CAP_SET) < 0 || + cap_set_flag(cp, CAP_INHERITABLE, 2, newcaps, CAP_SET) < 0 ) { + rsy...
2007 Feb 23
0
Simple patch
...reciated, I'll test it thoroughly later when I get some free time (and, if it works, remove the test message!). David --- configure.in 2007-02-22 21:50:07.000000000 +0000 +++ configure.in 2007-02-23 17:52:16.000000000 +0000 @@ -382,6 +382,17 @@ ]) ]) +AC_CHECK_FUNC(cap_init, [], [ + AC_CHECK_LIB(cap, cap_init, [ + have_libcap=yes + LIBS="$LIBS -lcap" + ]) +]) + +if test "$have_libcap" = "yes"; then + AC_DEFINE(HAVE_LIBCAP,, libcap is installed for cap_init()) +fi + AC_CHECK_FUNC(fdatasync, [...