Commit a5399b02 authored by Mike Hibler's avatar Mike Hibler

More problems fixed while debugging other issues.

Actually limit the number of groups like we say we do.
Treat ETIMEDOUT like EWOULDBLOCK.
parent 12a9db43
......@@ -1583,9 +1583,11 @@ emulab_get_host_authinfo(struct in_addr *req, struct in_addr *host,
assert(res != NULL);
nrows = mysql_num_rows(res);
if (nrows > MAXGIDS)
if (nrows > MAXGIDS) {
FrisWarning("User '%s' in more than %d groups, truncating list",
ei->sname, MAXGIDS);
nrows = MAXGIDS;
}
for (i = 0; i < nrows; i++) {
row = mysql_fetch_row(res);
if (get != NULL) {
......
/*
* Copyright (c) 2010-2015 University of Utah and the Flux Group.
* Copyright (c) 2010-2017 University of Utah and the Flux Group.
*
* {{{EMULAB-LICENSE
*
......@@ -457,7 +457,6 @@ usage(void)
" image location is accessible by the caller.\n"
" -N Do not attempt to verify the upload.\n"
" -s Use encryption.\n\n"
#if 0
"or:\n\n"
"upload [options] -S <server> -p <port> <file-to-upload>\n"
"Upload without using the master server. Here -S and -p identify\n"
......@@ -468,7 +467,6 @@ usage(void)
" -k <size> Specify the socket buffer size to use (1M by default)\n"
" -T <timeout> Time in seconds to wait for the upload to finish.\n"
" -s Use encryption.\n\n"
#endif
"\n\n";
fprintf(stderr, "Frisbee upload/download client\n%s", usagestr);
exit(1);
......
/*
* Copyright (c) 2010-2015 University of Utah and the Flux Group.
* Copyright (c) 2010-2017 University of Utah and the Flux Group.
*
* {{{EMULAB-LICENSE
*
......@@ -398,7 +398,7 @@ SOCK_Read(int sockfd, void *buf, int num, conn *conn)
if ((nread = read(sockfd, ptr, nio)) < 0) {
if (errno == EINTR)
nread = 0; /* and call read() again */
else if (errno == EWOULDBLOCK) {
else if (errno == EWOULDBLOCK || errno == ETIMEDOUT) {
conn->flags |= CONN_TIMEDOUT;
break;
} else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment