X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Fafs%2Fafs_pioctl.c;h=931abf1936d6d5905182274c7aa8c2e92f75d57f;hp=355048afd8e69e3dae468276d8b0c5cc88a6ff54;hb=5a2ae98327520a6936d8bbe6b2a9128dc45a2406;hpb=e6aa0b38e9970ca10e498e03b0149f895edf9e73 diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index 355048a..931abf1 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -5138,9 +5138,10 @@ DECL_PIOCTL(PDiscon) static afs_int32 mode = 1; /* Start up in 'off' */ afs_int32 force = 0; int code = 0; - char flags[3]; + char flags[4]; + struct vrequest lreq; - if (afs_pd_getBytes(ain, &flags, 3) == 0) { + if (afs_pd_getBytes(ain, &flags, 4) == 0) { if (!afs_osi_suser(*acred)) return EPERM; @@ -5150,6 +5151,12 @@ DECL_PIOCTL(PDiscon) afs_ConflictPolicy = flags[1] - 1; if (flags[2]) force = 1; + if (flags[3]) { + /* Fake InitReq support for UID override */ + memset(&lreq, 0, sizeof(lreq)); + lreq.uid = flags[3]; + areq = &lreq; /* override areq we got */ + } /* * All of these numbers are hard coded in fs.c. If they