idx int64 | func_before string | Vulnerability Classification string | vul int64 | func_after string | patch string | CWE ID string | lines_before string | lines_after string |
|---|---|---|---|---|---|---|---|---|
9,200 | bool ignore_file(const char *filename) {
assert(filename);
return
filename[0] == '.' ||
streq(filename, "lost+found") ||
streq(filename, "aquota.user") ||
streq(filename, "aquota.group") ||
endswith(filename, "~") ||
... | null | 0 | bool ignore_file(const char *filename) {
assert(filename);
return
filename[0] == '.' ||
streq(filename, "lost+found") ||
streq(filename, "aquota.user") ||
streq(filename, "aquota.group") ||
endswith(filename, "~") ||
... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,201 | int ignore_signals(int sig, ...) {
struct sigaction sa;
va_list ap;
int r = 0;
zero(sa);
sa.sa_handler = SIG_IGN;
sa.sa_flags = SA_RESTART;
if (sigaction(sig, &sa, NULL) < 0)
r = -errno;
va_start(ap, sig);
while ((sig = va_arg(ap... | null | 0 | int ignore_signals(int sig, ...) {
struct sigaction sa;
va_list ap;
int r = 0;
zero(sa);
sa.sa_handler = SIG_IGN;
sa.sa_flags = SA_RESTART;
if (sigaction(sig, &sa, NULL) < 0)
r = -errno;
va_start(ap, sig);
while ((sig = va_arg(ap... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,202 | bool in_charset(const char *s, const char* charset) {
const char *i;
assert(s);
assert(charset);
for (i = s; *i; i++)
if (!strchr(charset, *i))
return false;
return true;
}
| null | 0 | bool in_charset(const char *s, const char* charset) {
const char *i;
assert(s);
assert(charset);
for (i = s; *i; i++)
if (!strchr(charset, *i))
return false;
return true;
}
| @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,203 | bool is_device_path(const char *path) {
/* Returns true on paths that refer to a device, either in
* sysfs or in /dev */
return
path_startswith(path, "/dev/") ||
path_startswith(path, "/sys/");
}
| null | 0 | bool is_device_path(const char *path) {
/* Returns true on paths that refer to a device, either in
* sysfs or in /dev */
return
path_startswith(path, "/dev/") ||
path_startswith(path, "/sys/");
}
| @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,204 | int is_kernel_thread(pid_t pid) {
char *p;
size_t count;
char c;
bool eof;
FILE *f;
if (pid == 0)
return 0;
if (asprintf(&p, "/proc/%lu/cmdline", (unsigned long) pid) < 0)
return -ENOMEM;
f = fopen(p, "re");
free(... | null | 0 | int is_kernel_thread(pid_t pid) {
char *p;
size_t count;
char c;
bool eof;
FILE *f;
if (pid == 0)
return 0;
if (asprintf(&p, "/proc/%lu/cmdline", (unsigned long) pid) < 0)
return -ENOMEM;
f = fopen(p, "re");
free(... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,205 | ssize_t loop_read(int fd, void *buf, size_t nbytes, bool do_poll) {
uint8_t *p;
ssize_t n = 0;
assert(fd >= 0);
assert(buf);
p = buf;
while (nbytes > 0) {
ssize_t k;
if ((k = read(fd, p, nbytes)) <= 0) {
if (k <... | null | 0 | ssize_t loop_read(int fd, void *buf, size_t nbytes, bool do_poll) {
uint8_t *p;
ssize_t n = 0;
assert(fd >= 0);
assert(buf);
p = buf;
while (nbytes > 0) {
ssize_t k;
if ((k = read(fd, p, nbytes)) <= 0) {
if (k <... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,206 | int make_null_stdio(void) {
int null_fd;
if ((null_fd = open("/dev/null", O_RDWR|O_NOCTTY)) < 0)
return -errno;
return make_stdio(null_fd);
}
| null | 0 | int make_null_stdio(void) {
int null_fd;
if ((null_fd = open("/dev/null", O_RDWR|O_NOCTTY)) < 0)
return -errno;
return make_stdio(null_fd);
}
| @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,207 | int make_stdio(int fd) {
int r, s, t;
assert(fd >= 0);
r = dup2(fd, STDIN_FILENO);
s = dup2(fd, STDOUT_FILENO);
t = dup2(fd, STDERR_FILENO);
if (fd >= 3)
close_nointr_nofail(fd);
if (r < 0 || s < 0 || t < 0)
return -errno;
... | null | 0 | int make_stdio(int fd) {
int r, s, t;
assert(fd >= 0);
r = dup2(fd, STDIN_FILENO);
s = dup2(fd, STDOUT_FILENO);
t = dup2(fd, STDERR_FILENO);
if (fd >= 3)
close_nointr_nofail(fd);
if (r < 0 || s < 0 || t < 0)
return -errno;
... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,208 | int mkdir_p(const char *path, mode_t mode) {
int r;
/* Like mkdir -p */
if ((r = mkdir_parents(path, mode)) < 0)
return r;
if (label_mkdir(path, mode) < 0 && errno != EEXIST)
return -errno;
return 0;
}
| null | 0 | int mkdir_p(const char *path, mode_t mode) {
int r;
/* Like mkdir -p */
if ((r = mkdir_parents(path, mode)) < 0)
return r;
if (label_mkdir(path, mode) < 0 && errno != EEXIST)
return -errno;
return 0;
}
| @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,209 | usec_t now(clockid_t clock_id) {
struct timespec ts;
assert_se(clock_gettime(clock_id, &ts) == 0);
return timespec_load(&ts);
}
| null | 0 | usec_t now(clockid_t clock_id) {
struct timespec ts;
assert_se(clock_gettime(clock_id, &ts) == 0);
return timespec_load(&ts);
}
| @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,210 | char octchar(int x) {
return '0' + (x & 7);
}
| null | 0 | char octchar(int x) {
return '0' + (x & 7);
}
| @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,211 | int open_terminal(const char *name, int mode) {
int fd, r;
unsigned c = 0;
/*
* If a TTY is in the process of being closed opening it might
* cause EIO. This is horribly awful, but unlikely to be
* changed in the kernel. Hence we work around this problem by
*... | null | 0 | int open_terminal(const char *name, int mode) {
int fd, r;
unsigned c = 0;
/*
* If a TTY is in the process of being closed opening it might
* cause EIO. This is horribly awful, but unlikely to be
* changed in the kernel. Hence we work around this problem by
*... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,212 | size_t page_size(void) {
static __thread size_t pgsz = 0;
long r;
if (_likely_(pgsz > 0))
return pgsz;
assert_se((r = sysconf(_SC_PAGESIZE)) > 0);
pgsz = (size_t) r;
return pgsz;
}
| null | 0 | size_t page_size(void) {
static __thread size_t pgsz = 0;
long r;
if (_likely_(pgsz > 0))
return pgsz;
assert_se((r = sysconf(_SC_PAGESIZE)) > 0);
pgsz = (size_t) r;
return pgsz;
}
| @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,213 | int parse_boolean(const char *v) {
assert(v);
if (streq(v, "1") || v[0] == 'y' || v[0] == 'Y' || v[0] == 't' || v[0] == 'T' || !strcasecmp(v, "on"))
return 1;
else if (streq(v, "0") || v[0] == 'n' || v[0] == 'N' || v[0] == 'f' || v[0] == 'F' || !strcasecmp(v, "off"))
... | null | 0 | int parse_boolean(const char *v) {
assert(v);
if (streq(v, "1") || v[0] == 'y' || v[0] == 'Y' || v[0] == 't' || v[0] == 'T' || !strcasecmp(v, "on"))
return 1;
else if (streq(v, "0") || v[0] == 'n' || v[0] == 'N' || v[0] == 'f' || v[0] == 'F' || !strcasecmp(v, "off"))
... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,214 | int parse_env_file(
const char *fname,
const char *separator, ...) {
int r = 0;
char *contents = NULL, *p;
assert(fname);
assert(separator);
if ((r = read_full_file(fname, &contents, NULL)) < 0)
return r;
p = contents;
... | null | 0 | int parse_env_file(
const char *fname,
const char *separator, ...) {
int r = 0;
char *contents = NULL, *p;
assert(fname);
assert(separator);
if ((r = read_full_file(fname, &contents, NULL)) < 0)
return r;
p = contents;
... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,215 | int parse_usec(const char *t, usec_t *usec) {
static const struct {
const char *suffix;
usec_t usec;
} table[] = {
{ "sec", USEC_PER_SEC },
{ "s", USEC_PER_SEC },
{ "min", USEC_PER_MINUTE },
{ "hr", USEC_PER_... | null | 0 | int parse_usec(const char *t, usec_t *usec) {
static const struct {
const char *suffix;
usec_t usec;
} table[] = {
{ "sec", USEC_PER_SEC },
{ "s", USEC_PER_SEC },
{ "min", USEC_PER_MINUTE },
{ "hr", USEC_PER_... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,216 | bool path_equal(const char *a, const char *b) {
assert(a);
assert(b);
if ((a[0] == '/') != (b[0] == '/'))
return false;
for (;;) {
size_t j, k;
a += strspn(a, "/");
b += strspn(b, "/");
if (*a == 0 && *b ... | null | 0 | bool path_equal(const char *a, const char *b) {
assert(a);
assert(b);
if ((a[0] == '/') != (b[0] == '/'))
return false;
for (;;) {
size_t j, k;
a += strspn(a, "/");
b += strspn(b, "/");
if (*a == 0 && *b ... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,217 | bool path_is_absolute(const char *p) {
assert(p);
return p[0] == '/';
}
| null | 0 | bool path_is_absolute(const char *p) {
assert(p);
return p[0] == '/';
}
| @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,218 | int path_is_mount_point(const char *t, bool allow_symlink) {
struct stat a, b;
char *parent;
int r;
if (allow_symlink)
r = stat(t, &a);
else
r = lstat(t, &a);
if (r < 0) {
if (errno == ENOENT)
retur... | null | 0 | int path_is_mount_point(const char *t, bool allow_symlink) {
struct stat a, b;
char *parent;
int r;
if (allow_symlink)
r = stat(t, &a);
else
r = lstat(t, &a);
if (r < 0) {
if (errno == ENOENT)
retur... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,219 | char *path_make_absolute(const char *p, const char *prefix) {
assert(p);
/* Makes every item in the list an absolute path by prepending
* the prefix, if specified and necessary */
if (path_is_absolute(p) || !prefix)
return strdup(p);
return join(prefix, "/", p... | null | 0 | char *path_make_absolute(const char *p, const char *prefix) {
assert(p);
/* Makes every item in the list an absolute path by prepending
* the prefix, if specified and necessary */
if (path_is_absolute(p) || !prefix)
return strdup(p);
return join(prefix, "/", p... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,220 | unsigned long long random_ull(void) {
int fd;
uint64_t ull;
ssize_t r;
if ((fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC|O_NOCTTY)) < 0)
goto fallback;
r = loop_read(fd, &ull, sizeof(ull), true);
close_nointr_nofail(fd);
if (r != sizeof(ull))
... | null | 0 | unsigned long long random_ull(void) {
int fd;
uint64_t ull;
ssize_t r;
if ((fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC|O_NOCTTY)) < 0)
goto fallback;
r = loop_read(fd, &ull, sizeof(ull), true);
close_nointr_nofail(fd);
if (r != sizeof(ull))
... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,221 | int read_full_file(const char *fn, char **contents, size_t *size) {
FILE *f;
int r;
size_t n, l;
char *buf = NULL;
struct stat st;
if (!(f = fopen(fn, "re")))
return -errno;
if (fstat(fileno(f), &st) < 0) {
r = -errno;
... | null | 0 | int read_full_file(const char *fn, char **contents, size_t *size) {
FILE *f;
int r;
size_t n, l;
char *buf = NULL;
struct stat st;
if (!(f = fopen(fn, "re")))
return -errno;
if (fstat(fileno(f), &st) < 0) {
r = -errno;
... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,222 | int read_one_char(FILE *f, char *ret, usec_t t, bool *need_nl) {
struct termios old_termios, new_termios;
char c;
char line[LINE_MAX];
assert(f);
assert(ret);
if (tcgetattr(fileno(f), &old_termios) >= 0) {
new_termios = old_termios;
new_... | null | 0 | int read_one_char(FILE *f, char *ret, usec_t t, bool *need_nl) {
struct termios old_termios, new_termios;
char c;
char line[LINE_MAX];
assert(f);
assert(ret);
if (tcgetattr(fileno(f), &old_termios) >= 0) {
new_termios = old_termios;
new_... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,223 | int read_one_line_file(const char *fn, char **line) {
FILE *f;
int r;
char t[LINE_MAX], *c;
assert(fn);
assert(line);
f = fopen(fn, "re");
if (!f)
return -errno;
if (!fgets(t, sizeof(t), f)) {
if (ferror(f)) {
... | null | 0 | int read_one_line_file(const char *fn, char **line) {
FILE *f;
int r;
char t[LINE_MAX], *c;
assert(fn);
assert(line);
f = fopen(fn, "re");
if (!f)
return -errno;
if (!fgets(t, sizeof(t), f)) {
if (ferror(f)) {
... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,224 | int readlink_and_canonicalize(const char *p, char **r) {
char *t, *s;
int j;
assert(p);
assert(r);
j = readlink_and_make_absolute(p, &t);
if (j < 0)
return j;
s = canonicalize_file_name(t);
if (s) {
free(t);
... | null | 0 | int readlink_and_canonicalize(const char *p, char **r) {
char *t, *s;
int j;
assert(p);
assert(r);
j = readlink_and_make_absolute(p, &t);
if (j < 0)
return j;
s = canonicalize_file_name(t);
if (s) {
free(t);
... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,225 | int release_terminal(void) {
int r = 0, fd;
struct sigaction sa_old, sa_new;
if ((fd = open("/dev/tty", O_RDWR|O_NOCTTY|O_NDELAY|O_CLOEXEC)) < 0)
return -errno;
/* Temporarily ignore SIGHUP, so that we don't get SIGHUP'ed
* by our own TIOCNOTTY */
zero... | null | 0 | int release_terminal(void) {
int r = 0, fd;
struct sigaction sa_old, sa_new;
if ((fd = open("/dev/tty", O_RDWR|O_NOCTTY|O_NDELAY|O_CLOEXEC)) < 0)
return -errno;
/* Temporarily ignore SIGHUP, so that we don't get SIGHUP'ed
* by our own TIOCNOTTY */
zero... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,226 | void rename_process(const char name[8]) {
assert(name);
/* This is a like a poor man's setproctitle(). It changes the
* comm field, argv[0], and also the glibc's internally used
* name of the process. For the first one a limit of 16 chars
* applies, to the second one usually ... | null | 0 | void rename_process(const char name[8]) {
assert(name);
/* This is a like a poor man's setproctitle(). It changes the
* comm field, argv[0], and also the glibc's internally used
* name of the process. For the first one a limit of 16 chars
* applies, to the second one usually ... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,227 | int reset_all_signal_handlers(void) {
int sig;
for (sig = 1; sig < _NSIG; sig++) {
struct sigaction sa;
if (sig == SIGKILL || sig == SIGSTOP)
continue;
zero(sa);
sa.sa_handler = SIG_DFL;
sa.sa_flag... | null | 0 | int reset_all_signal_handlers(void) {
int sig;
for (sig = 1; sig < _NSIG; sig++) {
struct sigaction sa;
if (sig == SIGKILL || sig == SIGSTOP)
continue;
zero(sa);
sa.sa_handler = SIG_DFL;
sa.sa_flag... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,228 | int reset_terminal(const char *name) {
int fd, r;
fd = open_terminal(name, O_RDWR|O_NOCTTY|O_CLOEXEC);
if (fd < 0)
return fd;
r = reset_terminal_fd(fd, true);
close_nointr_nofail(fd);
return r;
}
| null | 0 | int reset_terminal(const char *name) {
int fd, r;
fd = open_terminal(name, O_RDWR|O_NOCTTY|O_CLOEXEC);
if (fd < 0)
return fd;
r = reset_terminal_fd(fd, true);
close_nointr_nofail(fd);
return r;
}
| @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,229 | int reset_terminal_fd(int fd, bool switch_to_text) {
struct termios termios;
int r = 0;
/* Set terminal to some sane defaults */
assert(fd >= 0);
/* We leave locked terminal attributes untouched, so that
* Plymouth may set whatever it wants to set, and we don't
... | null | 0 | int reset_terminal_fd(int fd, bool switch_to_text) {
struct termios termios;
int r = 0;
/* Set terminal to some sane defaults */
assert(fd >= 0);
/* We leave locked terminal attributes untouched, so that
* Plymouth may set whatever it wants to set, and we don't
... | @@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
if (is_dir) {
int subdir_fd;
- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
+ subdir_fd = ... | CWE-362 | null | null |
9,230 | _dupv8 (const char *s)
{
const char *end_valid;
if (!g_utf8_validate (s, -1, &end_valid))
{
g_print ("**** NOTE: The string '%s' is not valid UTF-8. Invalid characters begins at '%s'\n", s, end_valid);
return g_strndup (s, end_valid - s);
}
else
{
return g_strdup (s);
}
}
| +Info | 0 | _dupv8 (const char *s)
{
const char *end_valid;
if (!g_utf8_validate (s, -1, &end_valid))
{
g_print ("**** NOTE: The string '%s' is not valid UTF-8. Invalid characters begins at '%s'\n", s, end_valid);
return g_strndup (s, end_valid - s);
}
else
{
return g_strdup (s);
}
}
| @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,231 | daemon_linux_lvm2_lv_create (Daemon *daemon,
const gchar *group_uuid,
const gchar *name,
guint64 size,
guint num_stripes,
guint64 stripe_size,
gui... | +Info | 0 | daemon_linux_lvm2_lv_create (Daemon *daemon,
const gchar *group_uuid,
const gchar *name,
guint64 size,
guint num_stripes,
guint64 stripe_size,
gui... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,232 | daemon_linux_lvm2_lv_remove (Daemon *daemon,
const gchar *group_uuid,
const gchar *uuid,
gchar **options,
DBusGMethodInvocation *context)
{
daemon_local_check_auth (daemon,
NU... | +Info | 0 | daemon_linux_lvm2_lv_remove (Daemon *daemon,
const gchar *group_uuid,
const gchar *uuid,
gchar **options,
DBusGMethodInvocation *context)
{
daemon_local_check_auth (daemon,
NU... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,233 | daemon_linux_lvm2_lv_remove_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_da... | +Info | 0 | daemon_linux_lvm2_lv_remove_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_da... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,234 | daemon_linux_lvm2_lv_set_name (Daemon *daemon,
const gchar *group_uuid,
const gchar *uuid,
const gchar *new_name,
DBusGMethodInvocation *context)
{
daemon_local_check_auth (daemon,
... | +Info | 0 | daemon_linux_lvm2_lv_set_name (Daemon *daemon,
const gchar *group_uuid,
const gchar *uuid,
const gchar *new_name,
DBusGMethodInvocation *context)
{
daemon_local_check_auth (daemon,
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,235 | daemon_linux_lvm2_lv_set_name_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint n... | +Info | 0 | daemon_linux_lvm2_lv_set_name_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint n... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,236 | daemon_linux_lvm2_lv_start_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
... | +Info | 0 | daemon_linux_lvm2_lv_start_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,237 | daemon_linux_lvm2_lv_stop_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
... | +Info | 0 | daemon_linux_lvm2_lv_stop_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,238 | daemon_linux_lvm2_vg_add_pv_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num... | +Info | 0 | daemon_linux_lvm2_vg_add_pv_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,239 | daemon_linux_lvm2_vg_set_name (Daemon *daemon,
const gchar *uuid,
const gchar *new_name,
DBusGMethodInvocation *context)
{
daemon_local_check_auth (daemon,
NULL,
"org.free... | +Info | 0 | daemon_linux_lvm2_vg_set_name (Daemon *daemon,
const gchar *uuid,
const gchar *new_name,
DBusGMethodInvocation *context)
{
daemon_local_check_auth (daemon,
NULL,
"org.free... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,240 | daemon_linux_lvm2_vg_set_name_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint n... | +Info | 0 | daemon_linux_lvm2_vg_set_name_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint n... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,241 | daemon_linux_lvm2_vg_start (Daemon *daemon,
const gchar *uuid,
char **options,
DBusGMethodInvocation *context)
{
daemon_local_check_auth (daemon,
NULL,
"org.freedesktop.udisks.linu... | +Info | 0 | daemon_linux_lvm2_vg_start (Daemon *daemon,
const gchar *uuid,
char **options,
DBusGMethodInvocation *context)
{
daemon_local_check_auth (daemon,
NULL,
"org.freedesktop.udisks.linu... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,242 | daemon_linux_lvm2_vg_stop (Daemon *daemon,
const gchar *uuid,
char **options,
DBusGMethodInvocation *context)
{
daemon_local_check_auth (daemon,
NULL,
"org.freedesktop.udisks.linux-lv... | +Info | 0 | daemon_linux_lvm2_vg_stop (Daemon *daemon,
const gchar *uuid,
char **options,
DBusGMethodInvocation *context)
{
daemon_local_check_auth (daemon,
NULL,
"org.freedesktop.udisks.linux-lv... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,243 | daemon_linux_lvm2_vg_stop_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
... | +Info | 0 | daemon_linux_lvm2_vg_stop_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,244 | daemon_linux_md_create (Daemon *daemon,
GPtrArray *components,
char *level,
guint64 stripe_size,
char *name,
char **options,
DBusGMethodInvocation *context)
{
gchar **compone... | +Info | 0 | daemon_linux_md_create (Daemon *daemon,
GPtrArray *components,
char *level,
guint64 stripe_size,
char *name,
char **options,
DBusGMethodInvocation *context)
{
gchar **compone... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,245 | daemon_linux_md_create_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
... | +Info | 0 | daemon_linux_md_create_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,246 | daemon_linux_md_start (Daemon *daemon,
GPtrArray *components,
char **options,
DBusGMethodInvocation *context)
{
gchar **components_as_strv;
guint n;
components_as_strv = g_new0 (gchar *, components->len + 1);
for (n = 0; n < components->len; ... | +Info | 0 | daemon_linux_md_start (Daemon *daemon,
GPtrArray *components,
char **options,
DBusGMethodInvocation *context)
{
gchar **components_as_strv;
guint n;
components_as_strv = g_new0 (gchar *, components->len + 1);
for (n = 0; n < components->len; ... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,247 | daemon_linux_md_start_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
... | +Info | 0 | daemon_linux_md_start_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,248 | decode_udev_encoded_string (const gchar *str)
{
GString *s;
gchar *ret;
const gchar *end_valid;
guint n;
s = g_string_new (NULL);
for (n = 0; str[n] != '\0'; n++)
{
if (str[n] == '\\')
{
gint val;
if (str[n + 1] != 'x' || str[n + 2] == '\0' || str[n + 3] == '\0')
... | +Info | 0 | decode_udev_encoded_string (const gchar *str)
{
GString *s;
gchar *ret;
const gchar *end_valid;
guint n;
s = g_string_new (NULL);
for (n = 0; str[n] != '\0'; n++)
{
if (str[n] == '\\')
{
gint val;
if (str[n + 1] != 'x' || str[n + 2] == '\0' || str[n + 3] == '\0')
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,249 | device_changed (Device *device,
GUdevDevice *d,
gboolean synthesized)
{
gboolean keep_device;
g_object_unref (device->priv->d);
device->priv->d = g_object_ref (d);
keep_device = update_info (device);
/* this 'change' event might prompt us to remove the device */
if (!keep_... | +Info | 0 | device_changed (Device *device,
GUdevDevice *d,
gboolean synthesized)
{
gboolean keep_device;
g_object_unref (device->priv->d);
device->priv->d = g_object_ref (d);
keep_device = update_info (device);
/* this 'change' event might prompt us to remove the device */
if (!keep_... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,250 | device_class_init (DeviceClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->constructor = device_constructor;
object_class->finalize = device_finalize;
object_class->get_property = get_property;
g_type_class_add_private (klass, sizeof(DevicePrivate));
signals[CHANGED_SIGNA... | +Info | 0 | device_class_init (DeviceClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->constructor = device_constructor;
object_class->finalize = device_finalize;
object_class->get_property = get_property;
g_type_class_add_private (klass, sizeof(DevicePrivate));
signals[CHANGED_SIGNA... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,251 | device_constructor (GType type,
guint n_construct_properties,
GObjectConstructParam *construct_properties)
{
Device *device;
DeviceClass *klass;
klass = DEVICE_CLASS (g_type_class_peek (TYPE_DEVICE));
device = DEVICE (G_OBJECT_CLASS (device_parent_class)->constructor (t... | +Info | 0 | device_constructor (GType type,
guint n_construct_properties,
GObjectConstructParam *construct_properties)
{
Device *device;
DeviceClass *klass;
klass = DEVICE_CLASS (g_type_class_peek (TYPE_DEVICE));
device = DEVICE (G_OBJECT_CLASS (device_parent_class)->constructor (t... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,252 | device_drive_ata_smart_initiate_selftest (Device *device,
const char *test,
gchar **options,
DBusGMethodInvocation *context)
{
if (!device->priv->drive_ata_smart_is_available)
{
thro... | +Info | 0 | device_drive_ata_smart_initiate_selftest (Device *device,
const char *test,
gchar **options,
DBusGMethodInvocation *context)
{
if (!device->priv->drive_ata_smart_is_available)
{
thro... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,253 | device_drive_ata_smart_initiate_selftest_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
... | +Info | 0 | device_drive_ata_smart_initiate_selftest_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,254 | device_drive_ata_smart_refresh_data (Device *device,
char **options,
DBusGMethodInvocation *context)
{
const gchar *action_id;
action_id = NULL;
if (context != NULL)
{
action_id = "org.freedesktop.udisks.drive-ata-smart-refresh";... | +Info | 0 | device_drive_ata_smart_refresh_data (Device *device,
char **options,
DBusGMethodInvocation *context)
{
const gchar *action_id;
action_id = NULL;
if (context != NULL)
{
action_id = "org.freedesktop.udisks.drive-ata-smart-refresh";... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,255 | device_drive_ata_smart_refresh_data_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
... | +Info | 0 | device_drive_ata_smart_refresh_data_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,256 | device_drive_benchmark (Device *device,
gboolean do_write_benchmark,
char **options,
DBusGMethodInvocation *context)
{
if (!device->priv->device_is_drive)
{
throw_error (context, ERROR_FAILED, "Device is not a drive");
goto out;
... | +Info | 0 | device_drive_benchmark (Device *device,
gboolean do_write_benchmark,
char **options,
DBusGMethodInvocation *context)
{
if (!device->priv->device_is_drive)
{
throw_error (context, ERROR_FAILED, "Device is not a drive");
goto out;
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,257 | device_drive_benchmark_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
... | +Info | 0 | device_drive_benchmark_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,258 | device_drive_detach (Device *device,
char **options,
DBusGMethodInvocation *context)
{
if (!device->priv->device_is_drive)
{
throw_error (context, ERROR_FAILED, "Device is not a drive");
goto out;
}
if (!device->priv->drive_can_detach)
{
throw... | +Info | 0 | device_drive_detach (Device *device,
char **options,
DBusGMethodInvocation *context)
{
if (!device->priv->device_is_drive)
{
throw_error (context, ERROR_FAILED, "Device is not a drive");
goto out;
}
if (!device->priv->drive_can_detach)
{
throw... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,259 | device_drive_eject (Device *device,
char **options,
DBusGMethodInvocation *context)
{
if (!device->priv->device_is_drive)
{
throw_error (context, ERROR_FAILED, "Device is not a drive");
goto out;
}
if (!device->priv->device_is_media_available)
{
... | +Info | 0 | device_drive_eject (Device *device,
char **options,
DBusGMethodInvocation *context)
{
if (!device->priv->device_is_drive)
{
throw_error (context, ERROR_FAILED, "Device is not a drive");
goto out;
}
if (!device->priv->device_is_media_available)
{
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,260 | device_drive_eject_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
gpointe... | +Info | 0 | device_drive_eject_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
gpointe... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,261 | device_drive_inhibit_polling (Device *device,
char **options,
DBusGMethodInvocation *context)
{
if (!device->priv->device_is_drive)
{
throw_error (context, ERROR_FAILED, "Device is not a drive");
goto out;
}
if (!device->priv->device_i... | +Info | 0 | device_drive_inhibit_polling (Device *device,
char **options,
DBusGMethodInvocation *context)
{
if (!device->priv->device_is_drive)
{
throw_error (context, ERROR_FAILED, "Device is not a drive");
goto out;
}
if (!device->priv->device_i... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,262 | device_drive_inhibit_polling_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_us... | +Info | 0 | device_drive_inhibit_polling_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_us... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,263 | device_drive_poll_media (Device *device,
DBusGMethodInvocation *context)
{
if (!device->priv->device_is_drive)
{
throw_error (context, ERROR_FAILED, "Device is not a drive");
goto out;
}
daemon_local_check_auth (device->priv->daemon,
device,
... | +Info | 0 | device_drive_poll_media (Device *device,
DBusGMethodInvocation *context)
{
if (!device->priv->device_is_drive)
{
throw_error (context, ERROR_FAILED, "Device is not a drive");
goto out;
}
daemon_local_check_auth (device->priv->daemon,
device,
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,264 | device_drive_poll_media_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
... | +Info | 0 | device_drive_poll_media_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,265 | device_drive_set_spindown_timeout (Device *device,
int timeout_seconds,
char **options,
DBusGMethodInvocation *context)
{
if (!device->priv->device_is_drive)
{
throw_error (context, ERROR_FAILED, "Device... | +Info | 0 | device_drive_set_spindown_timeout (Device *device,
int timeout_seconds,
char **options,
DBusGMethodInvocation *context)
{
if (!device->priv->device_is_drive)
{
throw_error (context, ERROR_FAILED, "Device... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,266 | device_drive_set_spindown_timeout_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
... | +Info | 0 | device_drive_set_spindown_timeout_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,267 | device_drive_uninhibit_polling (Device *device,
char *cookie,
DBusGMethodInvocation *context)
{
const gchar *sender;
Inhibitor *inhibitor;
GList *l;
sender = dbus_g_method_get_sender (context);
inhibitor = NULL;
for (l = device->priv->polling... | +Info | 0 | device_drive_uninhibit_polling (Device *device,
char *cookie,
DBusGMethodInvocation *context)
{
const gchar *sender;
Inhibitor *inhibitor;
GList *l;
sender = dbus_g_method_get_sender (context);
inhibitor = NULL;
for (l = device->priv->polling... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,268 | device_filesystem_create (Device *device,
const char *fstype,
char **options,
DBusGMethodInvocation *context)
{
daemon_local_check_auth (device->priv->daemon,
device,
device->priv->devic... | +Info | 0 | device_filesystem_create (Device *device,
const char *fstype,
char **options,
DBusGMethodInvocation *context)
{
daemon_local_check_auth (device->priv->daemon,
device,
device->priv->devic... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,269 | device_filesystem_create_internal (Device *device,
const char *fstype,
char **options,
FilesystemCreateHookFunc hook_func,
gpointer hook_user_data,
... | +Info | 0 | device_filesystem_create_internal (Device *device,
const char *fstype,
char **options,
FilesystemCreateHookFunc hook_func,
gpointer hook_user_data,
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,270 | device_filesystem_list_open_files (Device *device,
DBusGMethodInvocation *context)
{
if (!device->priv->device_is_mounted || device->priv->device_mount_paths->len == 0)
{
throw_error (context, ERROR_FAILED, "Device is not mounted");
goto out;
}
daemon_local_ch... | +Info | 0 | device_filesystem_list_open_files (Device *device,
DBusGMethodInvocation *context)
{
if (!device->priv->device_is_mounted || device->priv->device_mount_paths->len == 0)
{
throw_error (context, ERROR_FAILED, "Device is not mounted");
goto out;
}
daemon_local_ch... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,271 | device_filesystem_list_open_files_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
... | +Info | 0 | device_filesystem_list_open_files_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,272 | device_filesystem_mount (Device *device,
const char *filesystem_type,
char **given_options,
DBusGMethodInvocation *context)
{
const gchar *action_id;
gboolean auth_no_user_interaction;
gchar **options_to_pass;
guint n;
guint m;
if (... | +Info | 0 | device_filesystem_mount (Device *device,
const char *filesystem_type,
char **given_options,
DBusGMethodInvocation *context)
{
const gchar *action_id;
gboolean auth_no_user_interaction;
gchar **options_to_pass;
guint n;
guint m;
if (... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,273 | device_filesystem_mount_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
... | +Info | 0 | device_filesystem_mount_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,274 | device_filesystem_set_label (Device *device,
const char *new_label,
DBusGMethodInvocation *context)
{
const Filesystem *fs_details;
GError *error;
error = NULL;
if (device->priv->id_usage == NULL || strcmp (device->priv->id_usage, "filesystem") != 0)
... | +Info | 0 | device_filesystem_set_label (Device *device,
const char *new_label,
DBusGMethodInvocation *context)
{
const Filesystem *fs_details;
GError *error;
error = NULL;
if (device->priv->id_usage == NULL || strcmp (device->priv->id_usage, "filesystem") != 0)
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,275 | device_filesystem_unmount (Device *device,
char **options,
DBusGMethodInvocation *context)
{
const gchar *action_id;
uid_t uid_of_mount;
if (!device->priv->device_is_mounted || device->priv->device_mount_paths->len == 0)
{
throw_error (context, ERRO... | +Info | 0 | device_filesystem_unmount (Device *device,
char **options,
DBusGMethodInvocation *context)
{
const gchar *action_id;
uid_t uid_of_mount;
if (!device->priv->device_is_mounted || device->priv->device_mount_paths->len == 0)
{
throw_error (context, ERRO... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,276 | device_filesystem_unmount_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
... | +Info | 0 | device_filesystem_unmount_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,277 | device_generate_kernel_change_event (Device *device)
{
FILE *f;
char *filename;
filename = g_build_filename (device->priv->native_path, "uevent", NULL);
f = fopen (filename, "w");
if (f == NULL)
{
g_warning ("error opening %s for writing: %m", filename);
}
else
{
if (fputs ("change"... | +Info | 0 | device_generate_kernel_change_event (Device *device)
{
FILE *f;
char *filename;
filename = g_build_filename (device->priv->native_path, "uevent", NULL);
f = fopen (filename, "w");
if (f == NULL)
{
g_warning ("error opening %s for writing: %m", filename);
}
else
{
if (fputs ("change"... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,278 | device_has_logical_partitions (Device *device)
{
gboolean ret;
GList *l;
GList *devices;
ret = FALSE;
devices = daemon_local_get_all_devices (device->priv->daemon);
for (l = devices; l != NULL; l = l->next)
{
Device *d = DEVICE (l->data);
if (d->priv->device_is_partition && d->priv->parti... | +Info | 0 | device_has_logical_partitions (Device *device)
{
gboolean ret;
GList *l;
GList *devices;
ret = FALSE;
devices = daemon_local_get_all_devices (device->priv->daemon);
for (l = devices; l != NULL; l = l->next)
{
Device *d = DEVICE (l->data);
if (d->priv->device_is_partition && d->priv->parti... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,279 | device_init (Device *device)
{
device->priv = DEVICE_GET_PRIVATE (device);
device->priv->device_file_by_id = g_ptr_array_new ();
device->priv->device_file_by_path = g_ptr_array_new ();
device->priv->device_mount_paths = g_ptr_array_new ();
device->priv->partition_flags = g_ptr_array_new ();
device->priv->d... | +Info | 0 | device_init (Device *device)
{
device->priv = DEVICE_GET_PRIVATE (device);
device->priv->device_file_by_id = g_ptr_array_new ();
device->priv->device_file_by_path = g_ptr_array_new ();
device->priv->device_mount_paths = g_ptr_array_new ();
device->priv->partition_flags = g_ptr_array_new ();
device->priv->d... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,280 | device_job_cancel (Device *device,
DBusGMethodInvocation *context)
{
uid_t uid;
const gchar *action_id;
if (!device->priv->job_in_progress)
{
throw_error (context, ERROR_FAILED, "There is no job to cancel");
goto out;
}
if (!device->priv->job_is_cancellable)
{
... | +Info | 0 | device_job_cancel (Device *device,
DBusGMethodInvocation *context)
{
uid_t uid;
const gchar *action_id;
if (!device->priv->job_in_progress)
{
throw_error (context, ERROR_FAILED, "There is no job to cancel");
goto out;
}
if (!device->priv->job_is_cancellable)
{
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,281 | device_linux_md_add_spare (Device *device,
char *component,
char **options,
DBusGMethodInvocation *context)
{
if (!device->priv->device_is_linux_md)
{
throw_error (context, ERROR_FAILED, "Device is not a Linux md drive");
... | +Info | 0 | device_linux_md_add_spare (Device *device,
char *component,
char **options,
DBusGMethodInvocation *context)
{
if (!device->priv->device_is_linux_md)
{
throw_error (context, ERROR_FAILED, "Device is not a Linux md drive");
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,282 | device_linux_md_add_spare_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_u... | +Info | 0 | device_linux_md_add_spare_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_u... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,283 | device_linux_md_check_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
... | +Info | 0 | device_linux_md_check_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,284 | device_linux_md_expand (Device *device,
GPtrArray *components,
char **options,
DBusGMethodInvocation *context)
{
gchar **strv;
guint n;
if (!device->priv->device_is_linux_md)
{
throw_error (context, ERROR_FAILED, "Device is not a L... | +Info | 0 | device_linux_md_expand (Device *device,
GPtrArray *components,
char **options,
DBusGMethodInvocation *context)
{
gchar **strv;
guint n;
if (!device->priv->device_is_linux_md)
{
throw_error (context, ERROR_FAILED, "Device is not a L... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,285 | device_linux_md_remove_component (Device *device,
char *component,
char **options,
DBusGMethodInvocation *context)
{
if (!device->priv->device_is_linux_md)
{
throw_error (context, ERROR_FAILED, "Device is n... | +Info | 0 | device_linux_md_remove_component (Device *device,
char *component,
char **options,
DBusGMethodInvocation *context)
{
if (!device->priv->device_is_linux_md)
{
throw_error (context, ERROR_FAILED, "Device is n... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,286 | device_linux_md_remove_component_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
... | +Info | 0 | device_linux_md_remove_component_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,287 | device_linux_md_stop (Device *device,
char **options,
DBusGMethodInvocation *context)
{
if (!device->priv->device_is_linux_md)
{
throw_error (context, ERROR_FAILED, "Device is not a Linux md drive");
goto out;
}
daemon_local_check_auth (device->priv->... | +Info | 0 | device_linux_md_stop (Device *device,
char **options,
DBusGMethodInvocation *context)
{
if (!device->priv->device_is_linux_md)
{
throw_error (context, ERROR_FAILED, "Device is not a Linux md drive");
goto out;
}
daemon_local_check_auth (device->priv->... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,288 | device_local_get_dev (Device *device)
{
return device->priv->dev;
}
| +Info | 0 | device_local_get_dev (Device *device)
{
return device->priv->dev;
}
| @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,289 | device_local_get_device_file (Device *device)
{
return device->priv->device_file;
}
| +Info | 0 | device_local_get_device_file (Device *device)
{
return device->priv->device_file;
}
| @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,290 | device_local_get_native_path (Device *device)
{
return device->priv->native_path;
}
| +Info | 0 | device_local_get_native_path (Device *device)
{
return device->priv->native_path;
}
| @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,291 | device_local_get_object_path (Device *device)
{
return device->priv->object_path;
}
| +Info | 0 | device_local_get_object_path (Device *device)
{
return device->priv->object_path;
}
| @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,292 | device_local_is_busy (Device *device,
gboolean check_partitions,
GError **error)
{
gboolean ret;
ret = TRUE;
/* busy if a job is pending */
if (device->priv->job != NULL)
{
g_set_error (error, ERROR, ERROR_BUSY, "A job is pending on %s", device->priv->devi... | +Info | 0 | device_local_is_busy (Device *device,
gboolean check_partitions,
GError **error)
{
gboolean ret;
ret = TRUE;
/* busy if a job is pending */
if (device->priv->job != NULL)
{
g_set_error (error, ERROR, ERROR_BUSY, "A job is pending on %s", device->priv->devi... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,293 | device_local_logical_partitions_are_busy (Device *device)
{
gboolean ret;
GList *l;
GList *devices;
ret = FALSE;
devices = daemon_local_get_all_devices (device->priv->daemon);
for (l = devices; l != NULL; l = l->next)
{
Device *d = DEVICE (l->data);
if (d->priv->device_is_partition && d->... | +Info | 0 | device_local_logical_partitions_are_busy (Device *device)
{
gboolean ret;
GList *l;
GList *devices;
ret = FALSE;
devices = daemon_local_get_all_devices (device->priv->daemon);
for (l = devices; l != NULL; l = l->next)
{
Device *d = DEVICE (l->data);
if (d->priv->device_is_partition && d->... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,294 | device_local_partitions_are_busy (Device *device)
{
gboolean ret;
GList *l;
GList *devices;
ret = FALSE;
devices = daemon_local_get_all_devices (device->priv->daemon);
for (l = devices; l != NULL; l = l->next)
{
Device *d = DEVICE (l->data);
if (d->priv->device_is_partition && d->priv->pa... | +Info | 0 | device_local_partitions_are_busy (Device *device)
{
gboolean ret;
GList *l;
GList *devices;
ret = FALSE;
devices = daemon_local_get_all_devices (device->priv->daemon);
for (l = devices; l != NULL; l = l->next)
{
Device *d = DEVICE (l->data);
if (d->priv->device_is_partition && d->priv->pa... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,295 | device_luks_change_passphrase (Device *device,
const char *old_secret,
const char *new_secret,
DBusGMethodInvocation *context)
{
/* No need to check for busy; we can actually do this while the device is unlocked as
* only ... | +Info | 0 | device_luks_change_passphrase (Device *device,
const char *old_secret,
const char *new_secret,
DBusGMethodInvocation *context)
{
/* No need to check for busy; we can actually do this while the device is unlocked as
* only ... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,296 | device_luks_change_passphrase_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint n... | +Info | 0 | device_luks_change_passphrase_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint n... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,297 | device_luks_lock_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
gpointer *user_data... | +Info | 0 | device_luks_lock_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
gpointer *user_data... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,298 | device_luks_unlock_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
gpointe... | +Info | 0 | device_luks_unlock_authorized_cb (Daemon *daemon,
Device *device,
DBusGMethodInvocation *context,
const gchar *action_id,
guint num_user_data,
gpointe... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
9,299 | device_luks_unlock_internal (Device *device,
const char *secret,
char **options,
UnlockEncryptionHookFunc hook_func,
gpointer hook_user_data,
DBusGMethodInvocation *context)
{... | +Info | 0 | device_luks_unlock_internal (Device *device,
const char *secret,
char **options,
UnlockEncryptionHookFunc hook_func,
gpointer hook_user_data,
DBusGMethodInvocation *context)
{... | @@ -3336,6 +3336,8 @@ update_info_partition_on_linux_dmmp (Device *device)
goto out;
targets_type = g_udev_device_get_property_as_strv (device->priv->d, "UDISKS_DM_TARGETS_TYPE");
+ /* If we ever need this for other types than "linear", remember to update
+ udisks-dm-export.c as well. */
if (targets_t... | CWE-200 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.