kernel: remove Proc* argument from procsetuser() function

front
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)
error(Eperm);
procsetuser(up, "none");
procsetuser("none");
return n;
}
@ -143,7 +143,7 @@ hostownerwrite(char *a, int n)
srvrenameuser(eve, buf);
shrrenameuser(eve, buf);
kstrdup(&eve, buf);
procsetuser(up, buf);
procsetuser(buf);
return n;
}

View File

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

View File

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

View File

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