qrexec-lib: convert tabs to spaces

- Fix compile error on gcc 6 (-Werror=misleading-indentation)
- Follow coding style: https://www.qubes-os.org/doc/coding-style/
pull/6/head
Marek Marczykowski-Górecki 8 years ago
parent 93f676d998
commit 410ad3d25f
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

@ -62,10 +62,10 @@ void buffer_free(struct buffer *b)
}
/*
The following two functions can be made much more efficient.
Yet the profiling output show they are not significant CPU hogs, so
we keep them so simple to make them obviously correct.
*/
The following two functions can be made much more efficient.
Yet the profiling output show they are not significant CPU hogs, so
we keep them so simple to make them obviously correct.
*/
void buffer_append(struct buffer *b, const char *data, int len)
{

@ -61,7 +61,7 @@ int write_all(int fd, const void *buf, int size)
}
written += ret;
}
// fprintf(stderr, "sent %d bytes\n", size);
// fprintf(stderr, "sent %d bytes\n", size);
return 1;
}
@ -89,7 +89,7 @@ int read_all(int fd, void *buf, int size)
}
got_read += ret;
}
// fprintf(stderr, "read %d bytes\n", size);
// fprintf(stderr, "read %d bytes\n", size);
return 1;
}

@ -49,7 +49,7 @@ int get_server_socket(const char *socket_address)
close(s);
exit(1);
}
// chmod(sockname.sun_path, 0666);
// chmod(sockname.sun_path, 0666);
if (listen(s, 5) == -1) {
perror("listen() failed\n");
close(s);

@ -94,9 +94,9 @@ void fix_times_and_perms(struct file_header *untrusted_hdr,
const char *untrusted_name)
{
struct timeval times[2] =
{ {untrusted_hdr->atime, untrusted_hdr->atime_nsec / 1000},
{untrusted_hdr->mtime,
untrusted_hdr->mtime_nsec / 1000}
{
{untrusted_hdr->atime, untrusted_hdr->atime_nsec / 1000},
{untrusted_hdr->mtime, untrusted_hdr->mtime_nsec / 1000}
};
if (chmod(untrusted_name, untrusted_hdr->mode & 07777)) /* safe because of chroot */
do_exit(errno, untrusted_name);
@ -155,8 +155,8 @@ void process_one_file_reg(struct file_header *untrusted_hdr,
void process_one_file_dir(struct file_header *untrusted_hdr,
const char *untrusted_name)
{
// fix perms only when the directory is sent for the second time
// it allows to transfer r.x directory contents, as we create it rwx initially
// fix perms only when the directory is sent for the second time
// it allows to transfer r.x directory contents, as we create it rwx initially
struct stat buf;
if (!mkdir(untrusted_name, 0700)) /* safe because of chroot */
return;

@ -59,9 +59,9 @@ int flush_client_data(int fd, struct buffer *buffer)
}
/*
Write "len" bytes from "data" to "fd". If not all written, buffer the rest
to "buffer".
*/
* Write "len" bytes from "data" to "fd". If not all written, buffer the rest
* to "buffer".
*/
int write_stdin(int fd, const char *data, int len, struct buffer *buffer)
{
int ret;
@ -92,10 +92,10 @@ int write_stdin(int fd, const char *data, int len, struct buffer *buffer)
}
/*
Data feed process has exited, so we need to clear all control structures for
the client. However, if we have buffered data for the client (which is rare btw),
fire&forget a separate process to flush them.
*/
* Data feed process has exited, so we need to clear all control structures for
* the client. However, if we have buffered data for the client (which is rare btw),
* fire&forget a separate process to flush them.
*/
int fork_and_flush_stdin(int fd, struct buffer *buffer)
{
int i;

Loading…
Cancel
Save