File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -2589,7 +2589,7 @@ static void setup_capabilities(void)
2589
2589
*/
2590
2590
capng_setpid (syscall (SYS_gettid ));
2591
2591
capng_clear (CAPNG_SELECT_BOTH );
2592
- capng_updatev (CAPNG_ADD , CAPNG_PERMITTED | CAPNG_EFFECTIVE ,
2592
+ if ( capng_updatev (CAPNG_ADD , CAPNG_PERMITTED | CAPNG_EFFECTIVE ,
2593
2593
CAP_CHOWN ,
2594
2594
CAP_DAC_OVERRIDE ,
2595
2595
CAP_DAC_READ_SEARCH ,
@@ -2599,11 +2599,21 @@ static void setup_capabilities(void)
2599
2599
CAP_SETUID ,
2600
2600
CAP_MKNOD ,
2601
2601
CAP_SETFCAP ,
2602
- -1 );
2602
+ -1 )) {
2603
+ fuse_log (FUSE_LOG_ERR , "%s: capng_updatev failed\n" , __func__ );
2604
+ exit (1 );
2605
+ }
2603
2606
2604
- capng_apply (CAPNG_SELECT_BOTH );
2607
+ if (capng_apply (CAPNG_SELECT_BOTH )) {
2608
+ fuse_log (FUSE_LOG_ERR , "%s: capng_apply failed\n" , __func__ );
2609
+ exit (1 );
2610
+ }
2605
2611
2606
2612
cap .saved = capng_save_state ();
2613
+ if (!cap .saved ) {
2614
+ fuse_log (FUSE_LOG_ERR , "%s: capng_save_state failed\n" , __func__ );
2615
+ exit (1 );
2616
+ }
2607
2617
pthread_mutex_unlock (& cap .mutex );
2608
2618
}
2609
2619
You can’t perform that action at this time.
0 commit comments