kernel: remove Proc* argument from procsetuser() function

This commit is contained in:
cinap_lenrek 2020-12-19 18:07:12 +01:00
parent eb1dfed9ab
commit 58e6750401
4 changed files with 9 additions and 9 deletions

View file

@ -116,7 +116,7 @@ userwrite(char *a, int n)
{ {
if(n!=4 || strncmp(a, "none", 4)!=0) if(n!=4 || strncmp(a, "none", 4)!=0)
error(Eperm); error(Eperm);
procsetuser(up, "none"); procsetuser("none");
return n; return n;
} }
@ -143,7 +143,7 @@ hostownerwrite(char *a, int n)
srvrenameuser(eve, buf); srvrenameuser(eve, buf);
shrrenameuser(eve, buf); shrrenameuser(eve, buf);
kstrdup(&eve, buf); kstrdup(&eve, buf);
procsetuser(up, buf); procsetuser(buf);
return n; return n;
} }

View file

@ -246,7 +246,7 @@ capwrite(Chan *c, void *va, long n, vlong)
} }
secfree(p); secfree(p);
procsetuser(up, to); procsetuser(to);
secfree(cp); secfree(cp);
poperror(); poperror();

View file

@ -244,7 +244,7 @@ int procindex(ulong);
void procinit0(void); void procinit0(void);
ulong procpagecount(Proc*); ulong procpagecount(Proc*);
void procpriority(Proc*, int, int); void procpriority(Proc*, int, int);
void procsetuser(Proc*, char*); void procsetuser(char*);
Proc* proctab(int); Proc* proctab(int);
extern void (*proctrace)(Proc*, int, vlong); extern void (*proctrace)(Proc*, int, vlong);
void procwired(Proc*, int); void procwired(Proc*, int);

View file

@ -1608,12 +1608,12 @@ renameuser(char *old, char *new)
} }
void void
procsetuser(Proc *p, char *new) procsetuser(char *new)
{ {
qlock(&p->debug); qlock(&up->debug);
kstrdup(&p->user, new); kstrdup(&up->user, new);
p->basepri = PriNormal; up->basepri = PriNormal;
qunlock(&p->debug); qunlock(&up->debug);
} }
/* /*