|
xsecurelock
1.7.0
XSecureLock is an X11 screen lock utility.
|
#include "authproto.h"#include <errno.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include "../logging.h"#include "../mlock_page.h"#include "../util.h"Functions | |
| static size_t | WriteChars (int fd, const char *buf, size_t n) |
| void | WritePacket (int fd, char type, const char *message) |
| Writes a packet in above form. More... | |
| static size_t | ReadChars (int fd, char *buf, size_t n, int eof_permitted) |
| char | ReadPacket (int fd, char **message, int eof_permitted) |
| Reads a packet in above form. More... | |
|
static |
| char ReadPacket | ( | int | fd, |
| char ** | message, | ||
| int | eof_permitted | ||
| ) |
Reads a packet in above form.
| fd | The file descriptor to write to. |
| message | A pointer to store the message (will be mlock()d). Will always be set if function returns nonzero; caller must free it. |
| eof_permitted | If enabled, encountering EOF at the beginning will not count as an error but return 0 silently. |
|
static |
| void WritePacket | ( | int | fd, |
| char | type, | ||
| const char * | message | ||
| ) |
Writes a packet in above form.
| fd | The file descriptor to write to. |
| type | The packet type from above macros. |
| message | The message to include with the packet (NUL-terminated). |
1.8.14