summaryrefslogtreecommitdiff
path: root/sys/src/cmd/auth
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2022-12-25 18:02:18 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2022-12-25 18:02:18 +0000
commit02d09919941c8f33f93f9e643a2aebb1fea14a91 (patch)
treec42b4ff8286765ee96fc3a32be6cb01d20cfc986 /sys/src/cmd/auth
parent5b032deb0cbe7e1b959e37950c160382fa55d7a8 (diff)
auth: use caphash and capuse under /dev instead of #¤
Diffstat (limited to 'sys/src/cmd/auth')
-rw-r--r--sys/src/cmd/auth/as.c4
-rw-r--r--sys/src/cmd/auth/cron.c6
-rw-r--r--sys/src/cmd/auth/factotum/util.c10
-rw-r--r--sys/src/cmd/auth/login.c2
4 files changed, 11 insertions, 11 deletions
diff --git a/sys/src/cmd/auth/as.c b/sys/src/cmd/auth/as.c
index 4ba3f6cea..7a2e87bc0 100644
--- a/sys/src/cmd/auth/as.c
+++ b/sys/src/cmd/auth/as.c
@@ -100,7 +100,7 @@ mkcap(char *from, char *to)
uchar hash[SHA1dlen];
int fd;
- fd = open("#¤/caphash", OCEXEC|OWRITE);
+ fd = open("/dev/caphash", OCEXEC|OWRITE);
if(fd < 0)
return nil;
@@ -135,7 +135,7 @@ usecap(char *cap)
{
int fd, rv;
- fd = open("#¤/capuse", OWRITE);
+ fd = open("/dev/capuse", OCEXEC|OWRITE);
if(fd < 0)
return -1;
rv = write(fd, cap, strlen(cap));
diff --git a/sys/src/cmd/auth/cron.c b/sys/src/cmd/auth/cron.c
index a832c06ca..b7d018ab2 100644
--- a/sys/src/cmd/auth/cron.c
+++ b/sys/src/cmd/auth/cron.c
@@ -619,9 +619,9 @@ static int caphashfd;
void
initcap(void)
{
- caphashfd = open("#¤/caphash", OCEXEC|OWRITE);
+ caphashfd = open("/dev/caphash", OCEXEC|OWRITE);
if(caphashfd < 0)
- fprint(2, "%s: opening #¤/caphash: %r\n", argv0);
+ fprint(2, "%s: opening /dev/caphash: %r\n", argv0);
}
/*
@@ -667,7 +667,7 @@ usecap(char *cap)
{
int fd, rv;
- fd = open("#¤/capuse", OWRITE);
+ fd = open("/dev/capuse", OCEXEC|OWRITE);
if(fd < 0)
return -1;
rv = write(fd, cap, strlen(cap));
diff --git a/sys/src/cmd/auth/factotum/util.c b/sys/src/cmd/auth/factotum/util.c
index 42e40b281..a37ba4356 100644
--- a/sys/src/cmd/auth/factotum/util.c
+++ b/sys/src/cmd/auth/factotum/util.c
@@ -13,7 +13,7 @@ bindnetcs(void)
bind("#I", "/net", MBEFORE);
if(access("/net/cs", AEXIST) < 0){
- if((srvfd = open("#s/cs", ORDWR)) >= 0){
+ if((srvfd = open("/srv/cs", ORDWR)) >= 0){
if(mount(srvfd, -1, "/net", MBEFORE, "") != -1)
return 0;
close(srvfd);
@@ -619,9 +619,9 @@ static int caphashfd;
void
initcap(void)
{
- caphashfd = open("#¤/caphash", OWRITE);
+ caphashfd = open("/dev/caphash", OCEXEC|OWRITE);
// if(caphashfd < 0)
-// fprint(2, "%s: opening #¤/caphash: %r\n", argv0);
+// fprint(2, "%s: opening /dev/caphash: %r\n", argv0);
}
/*
@@ -888,10 +888,10 @@ writehostowner(char *owner)
if((s = strchr(owner,'@')) != nil)
*s = 0;
- fd = open("#c/hostowner", OWRITE);
+ fd = open("/dev/hostowner", OWRITE|OCEXEC);
if(fd >= 0){
if(fprint(fd, "%s", owner) < 0)
- fprint(2, "factotum: setting #c/hostowner to %q: %r\n",
+ fprint(2, "factotum: setting /dev/hostowner to %q: %r\n",
owner);
close(fd);
}
diff --git a/sys/src/cmd/auth/login.c b/sys/src/cmd/auth/login.c
index 508def0a0..fb581bc77 100644
--- a/sys/src/cmd/auth/login.c
+++ b/sys/src/cmd/auth/login.c
@@ -30,7 +30,7 @@ chuid(AuthInfo *ai)
int rv, fd;
/* change uid */
- fd = open("#¤/capuse", OWRITE);
+ fd = open("/dev/capuse", OCEXEC|OWRITE);
if(fd < 0)
sysfatal("can't change uid: %r");
rv = write(fd, ai->cap, strlen(ai->cap));