diff --git a/ndhc/ifchd.c b/ndhc/ifchd.c index 2748892..2c945bc 100644 --- a/ndhc/ifchd.c +++ b/ndhc/ifchd.c @@ -406,8 +406,7 @@ void ifch_main(void) nk_set_chroot(chroot_dir); memset(chroot_dir, '\0', sizeof chroot_dir); - nk_set_capability("cap_net_admin=ep"); - nk_set_uidgid(ifch_uid, ifch_gid); + nk_set_uidgid(ifch_uid, ifch_gid, "cap_net_admin=ep"); do_ifch_work(); } diff --git a/ndhc/ndhc.c b/ndhc/ndhc.c index 061ae7f..a0a48f4 100644 --- a/ndhc/ndhc.c +++ b/ndhc/ndhc.c @@ -441,7 +441,7 @@ static void ndhc_main(void) { nk_set_chroot(chroot_dir); memset(chroot_dir, '\0', sizeof chroot_dir); - nk_set_uidgid(ndhc_uid, ndhc_gid); + nk_set_uidgid(ndhc_uid, ndhc_gid, NULL); if (cs.ifsPrevState != IFS_UP) ifchange_deconfig(&cs); diff --git a/ndhc/sockd.c b/ndhc/sockd.c index dd1e5f5..3c32313 100644 --- a/ndhc/sockd.c +++ b/ndhc/sockd.c @@ -504,8 +504,8 @@ void sockd_main(void) setup_signals_sockd(); nk_set_chroot(chroot_dir); memset(chroot_dir, 0, sizeof chroot_dir); - nk_set_capability("cap_net_bind_service,cap_net_broadcast,cap_net_raw=ep"); - nk_set_uidgid(sockd_uid, sockd_gid); + nk_set_uidgid(sockd_uid, sockd_gid, + "cap_net_bind_service,cap_net_broadcast,cap_net_raw=ep"); do_sockd_work(); }