Skip to content

Commit 0dc5ee1

Browse files
committed
prctl PR_GET_DUMPABLE, PR_SET_DUMPABLE stubs
1 parent a8e49ae commit 0dc5ee1

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/process/prctl.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ use libkernel::proc::caps::CapabilitiesFlags;
1010

1111
const PR_SET_PDEATHSIG: i32 = 1;
1212
const PR_GET_PDEATHSIG: i32 = 2;
13+
const PR_GET_DUMPABLE: i32 = 3;
14+
const PR_SET_DUMPABLE: i32 = 4;
1315
const PR_CAPBSET_READ: i32 = 23;
1416
const PR_CAPBSET_DROP: i32 = 24;
1517
const PR_SET_NAME: i32 = 15;
@@ -246,6 +248,11 @@ pub async fn sys_prctl(
246248
match op {
247249
PR_SET_PDEATHSIG => pr_set_pdeath_sig(ctx, arg1 as i64),
248250
PR_GET_PDEATHSIG => pr_get_pdeath_sig(ctx),
251+
PR_GET_DUMPABLE => Ok(1),
252+
PR_SET_DUMPABLE => match arg1 {
253+
0 | 1 => Ok(0),
254+
_ => Err(KernelError::InvalidValue),
255+
},
249256
PR_SET_NAME => pr_set_name(ctx, TUA::from_value(arg1 as usize)).await,
250257
PR_GET_NAME => pr_get_name(ctx, TUA::from_value(arg1 as usize)).await,
251258
PR_CAPBSET_READ => pr_read_capbset(ctx, arg1 as usize),

0 commit comments

Comments
 (0)