Date: Mon, 27 Jul 2009 11:31:14 GMT From: Jonathan Anderson <jona@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 166610 for review Message-ID: <200907271131.n6RBVEwL062458@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=166610 Change 166610 by jona@jona-trustedbsd-belle-vmware on 2009/07/27 11:30:52 Removed some commented-out lines, changed some printf()s Affected files ... .. //depot/projects/trustedbsd/capabilities/src/tools/cap/user_angel/server.c#17 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/tools/cap/user_angel/server.c#17 (text+ko) ==== @@ -401,7 +401,7 @@ int sock = client->socket; if(ua_unmarshall_string(d, path, &pathlen) < 0) return -1; - printf(": %s\n", path); + printf(": '%s'\n", path); struct stat s; if(stat(path, &s)) return 1; @@ -421,18 +421,14 @@ int handle_path_request(struct client *client, struct ua_datum *d) { -// unsigned int fdlen = 0; char path[256] = ""; unsigned int pathlen = 256; int sock = client->socket; -// struct ua_datum *d = ua_recv(sock, NULL, &fdlen); if(ua_unmarshall_string(d, path, &pathlen) < 0) return -1; -// free(d); + printf(": '%s'\n", path); - printf(": %s\n", path); - int32_t flags, rights; if(ua_unmarshall_int(ua_recv(sock, NULL, NULL), &flags) < 0) return -1; if(ua_unmarshall_int(ua_recv(sock, NULL, NULL), &rights) < 0) return -1; @@ -485,18 +481,21 @@ return -1; } + printf(": "); for(int i = 0; i < len; i++) { const char *name = names[i]; struct ua_datum *d = ua_marshall_string(name, strlen(name)); + printf("'%s' ", name); if(ua_send(client->socket, d, fds + i, 1) < 0) { printf("Error sending file descriptor"); return -1; } } + printf("\n"); return 0; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907271131.n6RBVEwL062458>