Unified · Split
| @@ -1,6 +1,7 @@ | |||
| 1 | 20090320 | 1 | 20090320 |
| 2 | emu/port/win-x11a.c: unintuitively use xdisplay not xkbdcon to send to kbdproc (with big stack) to change cursor | 2 | emu/port/win-x11a.c: unintuitively use xdisplay not xkbdcon to send to kbdproc (with big stack) to change cursor |
| 3 | (the big stack is needed because XCreateBitmapFromData and XPutImage pass control to theme-related code that uses lots of stack space) | 3 | (the big stack is needed because XCreateBitmapFromData and XPutImage pass control to theme-related code that uses lots of stack space) |
| 4 | use uname not aname for user name in libstyx and set aname to "" by default | ||
| 4 | 20090222 | 5 | 20090222 |
| 5 | appl/cmd/ndb/registry.b and dis/registry.dis - implement flush for event file (issue 162) | 6 | appl/cmd/ndb/registry.b and dis/registry.dis - implement flush for event file (issue 162) |
| 6 | 20090217 | 7 | 20090217 |
| @@ -95,3 +95,4 @@ Qid styxqid(int path, int isdir); · 94 unmodified lines | |||
| 95 | void *styxmalloc(int n); | 95 | void *styxmalloc(int n); |
| 96 | void styxfree(void *p); | 96 | void styxfree(void *p); |
| 97 | void styxdebug(void); | 97 | void styxdebug(void); |
| 98 | void styxsetowner(char*); | ||
| @@ -1,4 +1,6 @@ | |||
| 1 | INSTALL | 1 | INSTALL |
| 2 | include | ||
| 3 | styxserver.h | ||
| 2 | asm | 4 | asm |
| 3 | NOTICE | 5 | NOTICE |
| 4 | asm.h | 6 | asm.h |
| @@ -795,7 +797,6 @@ tools · 790 unmodified lines | |||
| 795 | mkfile | 797 | mkfile |
| 796 | styxaux.h | 798 | styxaux.h |
| 797 | styxserver.c | 799 | styxserver.c |
| 798 | styxserver.h | ||
| 799 | mkfile | 800 | mkfile |
| 800 | odbc | 801 | odbc |
| 801 | mkfile | 802 | mkfile |
| @@ -3,6 +3,9 @@ · 2 unmodified lines | |||
| 3 | Styxserver \- C Styx server library | 3 | Styxserver \- C Styx server library |
| 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
| 5 | .EX | 5 | .EX |
| 6 | #include <lib9.h> | ||
| 7 | #include <styx.h> | ||
| 8 | #include <styxserver.h> | ||
| 6 | #define Qroot 0 | 9 | #define Qroot 0 |
| 7 | 10 | ||
| 8 | #define MSGMAX ((((8192+128)*2)+3) & ~3) | 11 | #define MSGMAX ((((8192+128)*2)+3) & ~3) |
| @@ -114,7 +114,7 @@ newclient(Styxserver *server, int fd) · 113 unmodified lines | |||
| 114 | c->state = 0; | 114 | c->state = 0; |
| 115 | c->fids = nil; | 115 | c->fids = nil; |
| 116 | c->uname = strdup(eve); | 116 | c->uname = strdup(eve); |
| 117 | c->aname = strdup(eve); | 117 | c->aname = strdup(""); |
| 118 | c->next = server->clients; | 118 | c->next = server->clients; |
| 119 | server->clients = c; | 119 | server->clients = c; |
| 120 | if(server->ops->newclient) | 120 | if(server->ops->newclient) |
| @@ -167,7 +167,7 @@ rd(Client *c, Fcall *r) · 46 unmodified lines | |||
| 167 | { | 167 | { |
| 168 | if(c->nc > 0){ /* last convM2S consumed nc bytes */ | 168 | if(c->nc > 0){ /* last convM2S consumed nc bytes */ |
| 169 | c->nread -= c->nc; | 169 | c->nread -= c->nc; |
| 170 | if(c->nread < 0){ | 170 | if((int)c->nread < 0){ |
| 171 | r->ename = "negative size in rd"; | 171 | r->ename = "negative size in rd"; |
| 172 | return -1; | 172 | return -1; |
| 173 | } | 173 | } |
| @@ -903,7 +903,7 @@ run(Client *c) · 729 unmodified lines | |||
| 903 | break; | 903 | break; |
| 904 | case Tattach: | 904 | case Tattach: |
| 905 | if(Debug) | 905 | if(Debug) |
| 906 | fprint(2, "Tattach %d %s\n", f.fid, f.uname[0] ? f.uname : c->uname); | 906 | fprint(2, "Tattach %d %s %s\n", f.fid, f.uname[0] ? f.uname : c->uname, f.aname[0]? f.aname: c->aname); |
| 907 | if(fp){ | 907 | if(fp){ |
| 908 | f.type = Rerror; | 908 | f.type = Rerror; |
| 909 | f.ename = "fid in use"; | 909 | f.ename = "fid in use"; |
| @@ -1065,3 +1065,9 @@ styxqid(int path, int isdir) · 155 unmodified lines | |||
| 1065 | q.type = 0; | 1065 | q.type = 0; |
| 1066 | return q; | 1066 | return q; |
| 1067 | } | 1067 | } |
| 1068 | |||
| 1069 | void | ||
| 1070 | styxsetowner(char *name) | ||
| 1071 | { | ||
| 1072 | eve = name; | ||
| 1073 | } | ||
| @@ -844,7 +844,7 @@ dbopen(Qid *qid, int omode) · 843 unmodified lines | |||
| 844 | break; | 844 | break; |
| 845 | case Qclonus: | 845 | case Qclonus: |
| 846 | p = &proto[PROTO(q)]; | 846 | p = &proto[PROTO(q)]; |
| 847 | cv = protoclone(p, c->aname); | 847 | cv = protoclone(p, c->uname); |
| 848 | if(cv == 0){ | 848 | if(cv == 0){ |
| 849 | return Enodev; | 849 | return Enodev; |
| 850 | } | 850 | } |
| @@ -860,7 +860,7 @@ dbopen(Qid *qid, int omode) · 9 unmodified lines | |||
| 860 | case Qctl: | 860 | case Qctl: |
| 861 | p = &proto[PROTO(q)]; | 861 | p = &proto[PROTO(q)]; |
| 862 | cv = p->conv[CONV(q)]; | 862 | cv = p->conv[CONV(q)]; |
| 863 | user = c->aname; | 863 | user = c->uname; |
| 864 | if((perm & (cv->perm>>6)) != perm) { | 864 | if((perm & (cv->perm>>6)) != perm) { |
| 865 | if(strcmp(user, cv->owner) != 0 || | 865 | if(strcmp(user, cv->owner) != 0 || |
| 866 | (perm & cv->perm) != perm) { | 866 | (perm & cv->perm) != perm) { |