History

20090320-1900

Charles.Forsyth committed 17 years ago

Commit d49685a1 parent 14d820f6 files · +18 −6Browse files

Unified · Split

6 files
  1. CHANGES +1 −0
  2. include/styxserver.h +1 −0
  3. lib/proto/src +2 −1
  4. man/10/styxserver +3 −0
  5. tools/libstyx/styxserver.c +9 −3
  6. tools/odbc/odbc.c +2 −2
CHANGES+1−0
@@ -1,6 +1,7 @@
120090320120090320
2 emu/port/win-x11a.c: unintuitively use xdisplay not xkbdcon to send to kbdproc (with big stack) to change cursor2 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
420090222520090222
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)
620090217720090217
include/styxserver.hrenamed from tools/libstyx/styxserver.h+1−0
@@ -95,3 +95,4 @@ Qid styxqid(int path, int isdir); · 94 unmodified lines
95void *styxmalloc(int n);95void *styxmalloc(int n);
96void styxfree(void *p);96void styxfree(void *p);
97void styxdebug(void);97void styxdebug(void);
98void styxsetowner(char*);
lib/proto/src+2−1
@@ -1,4 +1,6 @@
1INSTALL1INSTALL
2include
3 styxserver.h
2asm4asm
3 NOTICE5 NOTICE
4 asm.h6 asm.h
@@ -795,7 +797,6 @@ tools · 790 unmodified lines
795 mkfile797 mkfile
796 styxaux.h798 styxaux.h
797 styxserver.c799 styxserver.c
798 styxserver.h
799 mkfile800 mkfile
800 odbc801 odbc
801 mkfile802 mkfile
man/10/styxserver+3−0
@@ -3,6 +3,9 @@ · 2 unmodified lines
3Styxserver \- C Styx server library3Styxserver \- C Styx server library
4.SH SYNOPSIS4.SH SYNOPSIS
5.EX5.EX
6#include <lib9.h>
7#include <styx.h>
8#include <styxserver.h>
6#define Qroot 09#define Qroot 0
7 10
8#define MSGMAX ((((8192+128)*2)+3) & ~3)11#define MSGMAX ((((8192+128)*2)+3) & ~3)
tools/libstyx/styxserver.c+9−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
1069void
1070styxsetowner(char *name)
1071{
1072 eve = name;
1073}
tools/odbc/odbc.c+2−2
@@ -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) {