diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-12-19 18:07:12 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-12-19 18:07:12 +0100 |
commit | 58e6750401684c25a82c42c4edb5001a814f6d31 (patch) | |
tree | 4423ae3a6e3f19b3e88385256ef86906d11c7242 | |
parent | eb1dfed9abb054e4708fcb13ac6d8d537914ac77 (diff) | |
download | plan9front-58e6750401684c25a82c42c4edb5001a814f6d31.tar.xz |
kernel: remove Proc* argument from procsetuser() function
-rw-r--r-- | sys/src/9/port/auth.c | 4 | ||||
-rw-r--r-- | sys/src/9/port/devcap.c | 2 | ||||
-rw-r--r-- | sys/src/9/port/portfns.h | 2 | ||||
-rw-r--r-- | sys/src/9/port/proc.c | 10 |
4 files changed, 9 insertions, 9 deletions
diff --git a/sys/src/9/port/auth.c b/sys/src/9/port/auth.c index b6b19bd63..7622b09ca 100644 --- a/sys/src/9/port/auth.c +++ b/sys/src/9/port/auth.c @@ -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; } diff --git a/sys/src/9/port/devcap.c b/sys/src/9/port/devcap.c index 05c69f413..86f67eec2 100644 --- a/sys/src/9/port/devcap.c +++ b/sys/src/9/port/devcap.c @@ -246,7 +246,7 @@ capwrite(Chan *c, void *va, long n, vlong) } secfree(p); - procsetuser(up, to); + procsetuser(to); secfree(cp); poperror(); diff --git a/sys/src/9/port/portfns.h b/sys/src/9/port/portfns.h index 00c7e8b96..b616e2e54 100644 --- a/sys/src/9/port/portfns.h +++ b/sys/src/9/port/portfns.h @@ -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); diff --git a/sys/src/9/port/proc.c b/sys/src/9/port/proc.c index 34fad478f..211adf9d7 100644 --- a/sys/src/9/port/proc.c +++ b/sys/src/9/port/proc.c @@ -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); } /* |