[Info-vax] Integrity Privilege Difference
Hein RMS van den Heuvel
heinvandenheuvel at gmail.com
Wed Aug 10 13:48:08 EDT 2011
On Aug 10, 10:23 am, "Williams, Arlen" <arlen.willi... at hp.com> wrote:
> I am migrating some code from Alpha to Integrity and have run into a difference. > At some point in the code it goes into EXEC mode and adds a privilege to the current privileges. On the Alpha, when it goes back in USER mode, the added privilege is still there.
In the same image activation? Or a next image.
Are installed images in play here?
> But on Integrity, the added privilege is no longer there.
Where you able to positively verify that the privs were there 'for a
while'?
> Is this the way it is supposed to be working?
Noop.
> Is this a change that I can find in documentation somewhere? Is there a way to keep this functionality the same?
Gotta think it is a programming issue, bad data structure or some
such.
I have a tiny tool to grab other privs, once granted CMEXEC.
Works fine for me, an Alpha and Itanium alike.
That example leaves the privs set as requested by 'prmflg=1
( $ help sys $setprv arg )
fwiw,
Hein
#include descrip
#include prvdef
#include stdio
#include string
typedef struct { short len, cod; void *address; int *retlen; } item;
typedef struct { long count; void *address; } desc;
int sys$setprv(), sys$cmexec();
main(int argc, char *argv[]) {
__int64 privs_step_1 = PRV$M_CMEXEC ;
__int64 privs_step_2 = PRV$M_SYSGBL | PRV$M_SYSNAM | PRV$M_SYSLCK;
int setprv_args[] = { 4, 1, (int) &privs_step_2, 1, 0 };
int status, i;
status = sys$setprv ( 1, &privs_step_1, 0, 0);
if (status & 1) {
status = sys$cmexec (&sys$setprv, setprv_args);
} else {
printf ("Sorry... could not get required CMEXEC, privs.\n");
}
return status;
}
More information about the Info-vax
mailing list