mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
debug_decl and debug_decl_vars now require a semicolon at the end.
This commit is contained in:
@@ -81,7 +81,7 @@ static bool
|
||||
ts_match_record(struct timestamp_entry *key, struct timestamp_entry *entry,
|
||||
unsigned int recno)
|
||||
{
|
||||
debug_decl(ts_match_record, SUDOERS_DEBUG_AUTH)
|
||||
debug_decl(ts_match_record, SUDOERS_DEBUG_AUTH);
|
||||
|
||||
if (entry->version != key->version) {
|
||||
sudo_debug_printf(SUDO_DEBUG_DEBUG,
|
||||
@@ -155,7 +155,7 @@ ts_find_record(int fd, struct timestamp_entry *key, struct timestamp_entry *entr
|
||||
{
|
||||
struct timestamp_entry cur;
|
||||
unsigned int recno = 0;
|
||||
debug_decl(ts_find_record, SUDOERS_DEBUG_AUTH)
|
||||
debug_decl(ts_find_record, SUDOERS_DEBUG_AUTH);
|
||||
|
||||
/*
|
||||
* Find a matching record (does not match sid or time stamp value).
|
||||
@@ -197,7 +197,7 @@ ts_mkdirs(char *path, uid_t owner, gid_t group, mode_t mode,
|
||||
{
|
||||
bool ret;
|
||||
mode_t omask;
|
||||
debug_decl(ts_mkdirs, SUDOERS_DEBUG_AUTH)
|
||||
debug_decl(ts_mkdirs, SUDOERS_DEBUG_AUTH);
|
||||
|
||||
/* umask must not be more restrictive than the file modes. */
|
||||
omask = umask(ACCESSPERMS & ~(mode|parent_mode));
|
||||
@@ -234,7 +234,7 @@ ts_secure_dir(char *path, bool make_it, bool quiet)
|
||||
{
|
||||
struct stat sb;
|
||||
bool ret = false;
|
||||
debug_decl(ts_secure_dir, SUDOERS_DEBUG_AUTH)
|
||||
debug_decl(ts_secure_dir, SUDOERS_DEBUG_AUTH);
|
||||
|
||||
sudo_debug_printf(SUDO_DEBUG_INFO|SUDO_DEBUG_LINENO, "checking %s", path);
|
||||
switch (sudo_secure_dir(path, timestamp_uid, -1, &sb)) {
|
||||
@@ -282,7 +282,7 @@ ts_open(const char *path, int flags)
|
||||
{
|
||||
bool uid_changed = false;
|
||||
int fd;
|
||||
debug_decl(ts_open, SUDOERS_DEBUG_AUTH)
|
||||
debug_decl(ts_open, SUDOERS_DEBUG_AUTH);
|
||||
|
||||
if (timestamp_uid != 0)
|
||||
uid_changed = set_perms(PERM_TIMESTAMP);
|
||||
@@ -307,7 +307,7 @@ ts_write(int fd, const char *fname, struct timestamp_entry *entry, off_t offset)
|
||||
{
|
||||
ssize_t nwritten;
|
||||
off_t old_eof;
|
||||
debug_decl(ts_write, SUDOERS_DEBUG_AUTH)
|
||||
debug_decl(ts_write, SUDOERS_DEBUG_AUTH);
|
||||
|
||||
if (offset == -1) {
|
||||
old_eof = lseek(fd, 0, SEEK_CUR);
|
||||
@@ -358,7 +358,7 @@ ts_init_key(struct timestamp_entry *entry, struct passwd *pw, int flags,
|
||||
enum def_tuple ticket_type)
|
||||
{
|
||||
struct stat sb;
|
||||
debug_decl(ts_init_key, SUDOERS_DEBUG_AUTH)
|
||||
debug_decl(ts_init_key, SUDOERS_DEBUG_AUTH);
|
||||
|
||||
memset(entry, 0, sizeof(*entry));
|
||||
entry->version = TS_VERSION;
|
||||
@@ -422,7 +422,7 @@ timestamp_open(const char *user, pid_t sid)
|
||||
struct ts_cookie *cookie;
|
||||
char *fname = NULL;
|
||||
int tries, fd = -1;
|
||||
debug_decl(timestamp_open, SUDOERS_DEBUG_AUTH)
|
||||
debug_decl(timestamp_open, SUDOERS_DEBUG_AUTH);
|
||||
|
||||
/* Zero timeout means don't use the time stamp file. */
|
||||
if (!sudo_timespecisset(&def_timestamp_timeout)) {
|
||||
@@ -513,7 +513,7 @@ timestamp_lock_record(int fd, off_t pos, off_t len)
|
||||
struct sigaction sa, saveint, savequit;
|
||||
sigset_t mask, omask;
|
||||
bool ret;
|
||||
debug_decl(timestamp_lock_record, SUDOERS_DEBUG_AUTH)
|
||||
debug_decl(timestamp_lock_record, SUDOERS_DEBUG_AUTH);
|
||||
|
||||
if (pos >= 0 && lseek(fd, pos, SEEK_SET) == -1) {
|
||||
sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_ERRNO|SUDO_DEBUG_LINENO,
|
||||
@@ -556,7 +556,7 @@ timestamp_lock_record(int fd, off_t pos, off_t len)
|
||||
static bool
|
||||
timestamp_unlock_record(int fd, off_t pos, off_t len)
|
||||
{
|
||||
debug_decl(timestamp_unlock_record, SUDOERS_DEBUG_AUTH)
|
||||
debug_decl(timestamp_unlock_record, SUDOERS_DEBUG_AUTH);
|
||||
|
||||
if (pos >= 0 && lseek(fd, pos, SEEK_SET) == -1) {
|
||||
sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_ERRNO|SUDO_DEBUG_LINENO,
|
||||
@@ -574,7 +574,7 @@ ts_read(struct ts_cookie *cookie, struct timestamp_entry *entry)
|
||||
{
|
||||
ssize_t nread = -1;
|
||||
bool should_unlock = false;
|
||||
debug_decl(ts_read, SUDOERS_DEBUG_AUTH)
|
||||
debug_decl(ts_read, SUDOERS_DEBUG_AUTH);
|
||||
|
||||
/* If the record is not already locked, lock it now. */
|
||||
if (!cookie->locked) {
|
||||
@@ -623,7 +623,7 @@ timestamp_lock(void *vcookie, struct passwd *pw)
|
||||
struct timestamp_entry entry;
|
||||
off_t lock_pos;
|
||||
ssize_t nread;
|
||||
debug_decl(timestamp_lock, SUDOERS_DEBUG_AUTH)
|
||||
debug_decl(timestamp_lock, SUDOERS_DEBUG_AUTH);
|
||||
|
||||
if (cookie == NULL) {
|
||||
sudo_debug_printf(SUDO_DEBUG_DEBUG|SUDO_DEBUG_LINENO,
|
||||
@@ -732,7 +732,7 @@ void
|
||||
timestamp_close(void *vcookie)
|
||||
{
|
||||
struct ts_cookie *cookie = vcookie;
|
||||
debug_decl(timestamp_close, SUDOERS_DEBUG_AUTH)
|
||||
debug_decl(timestamp_close, SUDOERS_DEBUG_AUTH);
|
||||
|
||||
if (cookie != NULL) {
|
||||
close(cookie->fd);
|
||||
@@ -758,7 +758,7 @@ timestamp_status(void *vcookie, struct passwd *pw)
|
||||
struct timespec diff, now;
|
||||
int status = TS_ERROR; /* assume the worst */
|
||||
ssize_t nread;
|
||||
debug_decl(timestamp_status, SUDOERS_DEBUG_AUTH)
|
||||
debug_decl(timestamp_status, SUDOERS_DEBUG_AUTH);
|
||||
|
||||
/* Zero timeout means don't use time stamp files. */
|
||||
if (!sudo_timespecisset(&def_timestamp_timeout)) {
|
||||
@@ -884,7 +884,7 @@ timestamp_update(void *vcookie, struct passwd *pw)
|
||||
{
|
||||
struct ts_cookie *cookie = vcookie;
|
||||
int ret = false;
|
||||
debug_decl(timestamp_update, SUDOERS_DEBUG_AUTH)
|
||||
debug_decl(timestamp_update, SUDOERS_DEBUG_AUTH);
|
||||
|
||||
/* Zero timeout means don't use time stamp files. */
|
||||
if (!sudo_timespecisset(&def_timestamp_timeout)) {
|
||||
@@ -944,7 +944,7 @@ timestamp_remove(bool unlink_it)
|
||||
struct timestamp_entry key, entry;
|
||||
int fd = -1, ret = true;
|
||||
char *fname = NULL;
|
||||
debug_decl(timestamp_remove, SUDOERS_DEBUG_AUTH)
|
||||
debug_decl(timestamp_remove, SUDOERS_DEBUG_AUTH);
|
||||
|
||||
#ifdef TIOCCLRVERAUTH
|
||||
if (def_timestamp_type == kernel) {
|
||||
@@ -1018,7 +1018,7 @@ already_lectured(int unused)
|
||||
char status_file[PATH_MAX];
|
||||
struct stat sb;
|
||||
int len;
|
||||
debug_decl(already_lectured, SUDOERS_DEBUG_AUTH)
|
||||
debug_decl(already_lectured, SUDOERS_DEBUG_AUTH);
|
||||
|
||||
if (ts_secure_dir(def_lecture_status_dir, false, true)) {
|
||||
len = snprintf(status_file, sizeof(status_file), "%s/%s",
|
||||
@@ -1041,7 +1041,7 @@ set_lectured(void)
|
||||
{
|
||||
char lecture_status[PATH_MAX];
|
||||
int len, fd, ret = false;
|
||||
debug_decl(set_lectured, SUDOERS_DEBUG_AUTH)
|
||||
debug_decl(set_lectured, SUDOERS_DEBUG_AUTH);
|
||||
|
||||
len = snprintf(lecture_status, sizeof(lecture_status), "%s/%s",
|
||||
def_lecture_status_dir, user_name);
|
||||
|
Reference in New Issue
Block a user