From b8397a3c2c1603b37a6f4385b70d022f60489625 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Thu, 11 Apr 2013 13:45:11 +0200 Subject: [PATCH] libauth: auth_chuid empty (from sources) instead of an "i/o count too small", detect a missing capability (empty, null string) before the write, and diagnose it as such. --- sys/src/libauth/auth_chuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/src/libauth/auth_chuid.c b/sys/src/libauth/auth_chuid.c index 1bfbfff92..7ba0cfc6d 100644 --- a/sys/src/libauth/auth_chuid.c +++ b/sys/src/libauth/auth_chuid.c @@ -10,7 +10,7 @@ auth_chuid(AuthInfo *ai, char *ns) { int rv, fd; - if(ai == nil || ai->cap == nil){ + if(ai == nil || ai->cap == nil || ai->cap[0] == 0){ werrstr("no capability"); return -1; } -- 2.44.0