We return a pointer when we are using cap_init() or cap_service_open()
function, so check if cap_chanel_t is NULL is not enough. Casper with a normal libc will still fail in capability mote so let's not enter capability mode without casper support when we need to resolve DNS. Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D12823
This commit is contained in:
parent
d1f8082780
commit
fff97aa66a
@ -56,11 +56,13 @@ typedef struct nvlist nvlist_t;
|
||||
struct cap_channel;
|
||||
|
||||
typedef struct cap_channel cap_channel_t;
|
||||
#define CASPER_SUPPORT (1)
|
||||
#else
|
||||
struct cap_channel {
|
||||
int cch_fd;
|
||||
};
|
||||
typedef struct cap_channel cap_channel_t;
|
||||
#define CASPER_SUPPORT (0)
|
||||
#endif /* ! WITH_CASPER */
|
||||
#endif /* ! _CAP_CHANNEL_T_DECLARED */
|
||||
|
||||
|
@ -709,7 +709,7 @@ main(int argc, char *const *argv)
|
||||
if (options & F_NUMERIC)
|
||||
cansandbox = true;
|
||||
else if (capdns != NULL)
|
||||
cansandbox = true;
|
||||
cansandbox = CASPER_SUPPORT;
|
||||
else
|
||||
cansandbox = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user