search for: cap_set_flag

Displaying 3 results from an estimated 3 matches for "cap_set_flag".

2004 Jan 26
1
patch for linux capabilities
...RROR, 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 ) { + rsyserr(FERROR, errno, "cap_set_flag failed"); + io_printf(f_out, "@ERROR: cap_set_flag failed\n"); + return -1; + } + if( cap_set_proc(cp) < 0 ) {...
2011 May 17
2
CentOS 5.6 X86_64 install problem
...r (can post output from this long file if needed) Once that was done I ran the make command and got this at the end [3364/3441] Linking default/source3/smbd/smbd default/source3/libsamba3core.so: undefined reference to `cap_free' default/source3/libsamba3core.so: undefined reference to `cap_set_flag' default/source3/libsamba3core.so: undefined reference to `cap_get_proc' default/source3/libsamba3core.so: undefined reference to `cap_set_proc' collect2: ld returned 1 exit status Waf: Leaving directory `/samba-master/bin' Build failed: -> task failed (err #1): {t...
2007 Feb 23
0
Simple patch
...i_info("test message, monkeys"); + /* drop capabilities that we don't need, be very restrictive */ +#ifdef HAVE_LIBCAP + i_info("Found capability support, dropping unnecessary root priviledges"); + caps = cap_init(); + cap_clear(caps); + cap_set_flag(caps, CAP_PERMITTED, sizeof(suidcaps)/sizeof(cap_value_t), suidcaps, CAP_SET); + cap_set_flag(caps, CAP_EFFECTIVE, sizeof(suidcaps)/sizeof(cap_value_t), suidcaps, CAP_SET); + cap_set_proc(caps); + cap_free(caps); +#endif + lib_signals_init(); lib_signals_set...