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.
This commit is contained in:
cinap_lenrek 2013-04-11 13:45:11 +02:00
parent 5796736b70
commit b8397a3c2c

View file

@ -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;
}