All macros defining rts flags are prefixed with RTS_
- macros used with RTS_SET group of macros to define struct proc p_rts_flags are now prefixed with RTS_ to make things clear
This commit is contained in:
@@ -37,7 +37,7 @@ message *m_ptr; /* pointer to request message */
|
||||
|
||||
/* Check whether caller is allowed to make this call. Privileged proceses
|
||||
* can only update the privileges of processes that are inhibited from
|
||||
* running by the NO_PRIV flag. This flag is set when a privileged process
|
||||
* running by the RTS_NO_PRIV flag. This flag is set when a privileged process
|
||||
* forks.
|
||||
*/
|
||||
caller_ptr = proc_addr(who_p);
|
||||
@@ -49,7 +49,7 @@ message *m_ptr; /* pointer to request message */
|
||||
switch(m_ptr->CTL_REQUEST)
|
||||
{
|
||||
case SYS_PRIV_INIT:
|
||||
if (! RTS_ISSET(rp, NO_PRIV)) return(EPERM);
|
||||
if (! RTS_ISSET(rp, RTS_NO_PRIV)) return(EPERM);
|
||||
|
||||
/* Make sure this process has its own privileges structure. This may
|
||||
* fail, since there are only a limited number of system processes.
|
||||
@@ -145,17 +145,17 @@ message *m_ptr; /* pointer to request message */
|
||||
}
|
||||
|
||||
/* Done. Privileges have been set. Allow process to run again. */
|
||||
RTS_LOCK_UNSET(rp, NO_PRIV);
|
||||
RTS_LOCK_UNSET(rp, RTS_NO_PRIV);
|
||||
return(OK);
|
||||
case SYS_PRIV_USER:
|
||||
/* Make this process an ordinary user process. */
|
||||
if (!RTS_ISSET(rp, NO_PRIV)) return(EPERM);
|
||||
if (!RTS_ISSET(rp, RTS_NO_PRIV)) return(EPERM);
|
||||
if ((i=get_priv(rp, 0)) != OK) return(i);
|
||||
RTS_LOCK_UNSET(rp, NO_PRIV);
|
||||
RTS_LOCK_UNSET(rp, RTS_NO_PRIV);
|
||||
return(OK);
|
||||
|
||||
case SYS_PRIV_ADD_IO:
|
||||
if (RTS_ISSET(rp, NO_PRIV))
|
||||
if (RTS_ISSET(rp, RTS_NO_PRIV))
|
||||
return(EPERM);
|
||||
|
||||
/* Only system processes get I/O resources? */
|
||||
@@ -186,7 +186,7 @@ message *m_ptr; /* pointer to request message */
|
||||
return OK;
|
||||
|
||||
case SYS_PRIV_ADD_MEM:
|
||||
if (RTS_ISSET(rp, NO_PRIV))
|
||||
if (RTS_ISSET(rp, RTS_NO_PRIV))
|
||||
return(EPERM);
|
||||
|
||||
/* Only system processes get memory resources? */
|
||||
@@ -209,7 +209,7 @@ message *m_ptr; /* pointer to request message */
|
||||
return OK;
|
||||
|
||||
case SYS_PRIV_ADD_IRQ:
|
||||
if (RTS_ISSET(rp, NO_PRIV))
|
||||
if (RTS_ISSET(rp, RTS_NO_PRIV))
|
||||
return(EPERM);
|
||||
|
||||
/* Only system processes get IRQs? */
|
||||
|
||||
Reference in New Issue
Block a user