Displaying 20 results from an estimated 60 matches for "is_root".
2016 Dec 06
9
[PATCH 0/5] Improve inspection of /usr filesystems
...,
LVM /usr filesystems are not recognized as belonging to their roots.
Maybe a better API for this could be added, but since it's something
only related to the appliance then can stay internal for now. (Better
suggestions always welcome, of course.)
Thanks,
Pino Toscano (5):
inspect: change is_root flag into enum
inspect: mark CoreOS /usr partitions with own USR role
daemon: debug: new "exists" subcommand
inspect: fix existance check of /dev/mapper devices
inspect: gather info from /usr filesystems as well (RHBZ#1401474)
daemon/debug.c | 39 ++++++++++++++++++++++...
2013 Feb 13
0
Bugreport: btrfsck breaks with Assertion `!(rec->is_root)' failed
...d on 34172928 wanted 392666 found 395689
parent transid verify failed on 34172928 wanted 392666 found 395689
parent transid verify failed on 34172928 wanted 392666 found 395689
Ignoring transid failure
leaf parent key incorrect 34172928
btrfsck: btrfsck.c:1935: check_owner_ref: Assertion `!(rec->is_root)''
failed.
after that I tried to restore the data from disk unfortunately with an
older Version of btrfs-restore. There are a lot of files I have restored
but this process also breaks. (I can''t remember the message). But after
a second try (with old and the latest version) bre...
2014 Nov 27
2
[PATCH 1/1] inspect: Fix a bug in the *BSD root detection
...lt; g->nr_fses; ++i) {
+ fs = &g->fses[i];
+
+ is_primary = match (g, fs->mountable, re_primary_partition);
+ is_bsd = ((fs->type == OS_TYPE_FREEBSD) || \
+ (fs->type == OS_TYPE_NETBSD) || \
+ (fs->type == OS_TYPE_OPENBSD));
+
+ if (fs->is_root && is_primary && is_bsd) {
+ bsd_primary = fs;
+ continue;
+ }
+
+ if (fs->is_root && bsd_primary && (bsd_primary->type == fs->type)) {
+ /* remove the is root flag from the bsd_primary */
+ bsd_primary->is_root = 0;
+ bsd_p...
2001 Jul 11
1
RFD: uid of privileged user not fixed to 0
...the sources to become
substituted by a define as above which would allow to configure
that for different systems which doesn't neccessarily have the uid
0 and a root user at all?
Instead of constant (and badly portable) comparisons like
if (st.st_uid == 0)
we could use something like
if (is_root(st.st_uid))
which would allow macros like the following on Unices:
#define ROOT_UID 0
#define is_root(x) ((x) == ROOT_UID)
and other definitions on other systems:
#define ROOT_UID 18 /* "SYSTEM" account on NT/W2K */
and even functions:
#define is_root(x) wierd_system_is_root(x)...
2014 Nov 28
2
Re: [PATCH 1/1] inspect: Fix a bug in the *BSD root detection
...{
> + fs = &g->fses[i];
> +
> + is_primary = match (g, fs->mountable, re_primary_partition);
> + is_bsd =
> + fs->type == OS_TYPE_FREEBSD ||
> + fs->type == OS_TYPE_NETBSD ||
> + fs->type == OS_TYPE_OPENBSD;
> +
> + if (fs->is_root && is_primary && is_bsd) {
> + bsd_primary = fs;
> + continue;
> + }
This will run the regexp matching for every filesystem found; what
about inlining the match call as last part of the if, like:
is_bsd =
fs->type == OS_TYPE_FREEBSD ||
fs->...
2014 Oct 17
1
Re: missing btrfs subvol support
...ion.
> Also my attempt to "fix" it by using the -o option is unreliable.
>
> Richard, so what should be done with the root-partition-listed-twice
> issue mentioned in the URL above? Just check for a plain '@', assume
> thats the entire thing, and skip it to not set is_root=1?
Is '@' a particular marker for this situation? Or, from what I get,
there can be any label for this?
> The other bug is that mounting subvolumes in such setup fails anyway
> because the subvol= argument lacks the absolute path. It was suggested
> to use the "subvolume li...
2014 Oct 16
2
Re: missing btrfs subvol support
...Augeas. Instead, I think it's the naming
> convention SUSE uses for the root btrfs subvolume (@).
It does not look like its the naming convention. Insteads its the fact
that a given subvolume is for the entire root filesystem. So both sda2
and also the 'whatever' subvolume get ->is_root=1.
I can probably add a check somewhere to catch the whatever=="@". A
better fix would be to check if a given subvolume is for the entire
partition.
Furthermore there are appearent bugs in the subvolume parser. Will send
a patch to fix one of them shortly.
Olaf
2012 Jul 17
1
Unmountable btrfs filesystem
...The
output is as follows:
Ignoring transid failure
leaf parent key incorrect 528969142272
parent transid verify failed on 528969142272 wanted 22728 found 22726
Ignoring transid failure
leaf parent key incorrect 528969142272
btrfsck: btrfsck.c:1933: check_owner_ref: Assertion `!(rec->is_root)'' failed.
Aborted
My btrfs-progs comes from
repository:
git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git
at the commit: 8935d8436147f86dfbda3d8b8175a77b654b8abc
branch: master
and I''m running linux-3.5_rc7 kernel. (Linux...
2017 Feb 14
2
Re: [PATCH 2/2] lib: allow to walk registry with corrupted blocks
...if (seg_len <= 4 || (seg_len & 3) != 0) {
> - SET_ERRNO (ENOTSUP,
> - "%s: block size %" PRIi32 " at 0x%zx, bad registry",
> - filename, le32toh (block->seg_len), blkoff);
> - goto error;
> + if (is_root) {
> + bad_root_block = 1;
> + } else {
> + DEBUG(2,
As before, space before parens in function and macro calls.
> @@ -408,7 +407,7 @@ _get_children (hive_h *h, hive_node_h blkoff,
> hive_node_h subkey = le32toh (lf->keys[i].offset);
> s...
2016 Mar 17
2
[PATCH] inspect: improve UsrMove detection (RHBZ#1186935)
...uestfs_is_symlink (g, "/bin") > 0 &&
- guestfs_is_dir (g, "/usr/bin") > 0)) &&
+ is_symlink_to (g, "/bin", "usr/bin") > 0) &&
guestfs_is_file (g, "/etc/fstab") > 0) {
fs->is_root = 1;
fs->format = OS_FORMAT_INSTALLED;
@@ -366,6 +366,22 @@ get_partition_context (guestfs_h *g, const char *partition,
return 0;
}
+static int
+is_symlink_to (guestfs_h *g, const char *file, const char *wanted_target)
+{
+ CLEANUP_FREE char *target = NULL;
+
+ if (guestfs_is_symlin...
2014 Nov 28
0
Re: [PATCH 1/1] inspect: Fix a bug in the *BSD root detection
...; > +
> > + is_primary = match (g, fs->mountable, re_primary_partition);
> > + is_bsd =
> > + fs->type == OS_TYPE_FREEBSD ||
> > + fs->type == OS_TYPE_NETBSD ||
> > + fs->type == OS_TYPE_OPENBSD;
> > +
> > + if (fs->is_root && is_primary && is_bsd) {
> > + bsd_primary = fs;
> > + continue;
> > + }
>
> This will run the regexp matching for every filesystem found; what
> about inlining the match call as last part of the if, like:
>
> is_bsd =
> f...
2016 Feb 24
2
[PATCH] inspect: check also /etc/hosts for detecting Linux root (RHBZ#1203898)
...&&
guestfs_is_dir (g, "/usr/bin") > 0)) &&
- guestfs_is_file (g, "/etc/fstab") > 0) {
+ (guestfs_is_file (g, "/etc/fstab") > 0 ||
+ guestfs_is_file (g, "/etc/hosts") > 0)) {
fs->is_root = 1;
fs->format = OS_FORMAT_INSTALLED;
if (guestfs_int_check_linux_root (g, fs) == -1)
--
2.5.0
2014 Nov 28
1
Re: [synnefo-devel] Re: [PATCH 1/1] inspect: Fix a bug in the *BSD root detection
...+ is_primary = match (g, fs->mountable, re_primary_partition);
>>> + is_bsd =
>>> + fs->type == OS_TYPE_FREEBSD ||
>>> + fs->type == OS_TYPE_NETBSD ||
>>> + fs->type == OS_TYPE_OPENBSD;
>>> +
>>> + if (fs->is_root && is_primary && is_bsd) {
>>> + bsd_primary = fs;
>>> + continue;
>>> + }
>> This will run the regexp matching for every filesystem found; what
>> about inlining the match call as last part of the if, like:
>>
>> is...
2015 Jun 02
1
[PATCH 2/3] inspection: Add support for CoreOS
...&
+ guestfs_is_dir (g, "/root") > 0 &&
+ guestfs_is_dir (g, "/home") > 0 &&
+ guestfs_is_dir (g, "/usr") > 0 &&
+ guestfs_is_file (g, "/etc/coreos/update.conf") > 0) {
+ fs->is_root = 1;
+ fs->format = OS_FORMAT_INSTALLED;
+ if (guestfs_int_check_coreos_root (g, fs) == -1)
+ return -1;
+ }
/* Linux /usr/local? */
else if (is_dir_etc &&
is_dir_bin &&
@@ -246,6 +257,14 @@ check_filesystem (guestfs_h *g, const char *mountable,...
2015 May 29
2
[PATCH 2/3] inspection: Add support for CoreOS
...&
+ guestfs_is_dir (g, "/root") > 0 &&
+ guestfs_is_dir (g, "/home") > 0 &&
+ guestfs_is_dir (g, "/usr") > 0 &&
+ guestfs_is_file (g, "/etc/coreos/update.conf") > 0) {
+ fs->is_root = 1;
+ fs->format = OS_FORMAT_INSTALLED;
+ if (guestfs_int_check_coreos_root (g, fs) == -1)
+ return -1;
+ }
/* Linux /usr/local? */
else if (is_dir_etc &&
is_dir_bin &&
@@ -246,6 +257,14 @@ check_filesystem (guestfs_h *g, const char *mountable,...
2013 Nov 28
3
[PATCH 1/3] inspect: recognise Debian live images as such
Check for filesystem.squashfs also in /live, since it is where
live-build places it.
---
src/inspect-fs-cd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/inspect-fs-cd.c b/src/inspect-fs-cd.c
index 407e4f8..eaeaa6f 100644
--- a/src/inspect-fs-cd.c
+++ b/src/inspect-fs-cd.c
@@ -429,7 +429,8 @@ guestfs___check_installer_root (guestfs_h *g, struct inspect_fs *fs)
*
2013 Nov 28
3
Re: [PATCH 3/3] inspect: improve detection of FreeBSD install discs
...ot;/amd64/txtsetup.sif") > 0 ||
> - guestfs_is_file (g, "/freedos/freedos.ico") > 0)) {
> + guestfs_is_file (g, "/freedos/freedos.ico") > 0 ||
> + guestfs_is_file (g, "/boot/loader.rc") > 0)) {
> fs->is_root = 1;
> fs->format = OS_FORMAT_INSTALLER;
> if (guestfs___check_installer_root (g, fs) == -1)
> --
> 1.8.3.1
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
pow...
2012 Apr 12
4
Btrfs Array Recovery
...since I saw that
btrfsck could now repair some corruptions. I built the utilities and
executed btrfsck. This is the result of the command:
(http://pastebin.com/CEyvy17r) I saw that there was an error occurring
in the code at line 1864, so I commented out that line which had the
text: BUG_ON(rec->is_root);
I then recompiled the utilities and executed btrfsck again and got
this: (http://pastebin.com/ihYmuCAm) I also tried btrfsck with the
repair option with these results: (http://pastebin.com/gnrStyqh)
Another thing that I have experimented with is btrfs-restore. I have
been somewhat successful in...
2013 Feb 12
7
Remaining btrfs patches
[PATCH 1/7] mount: Add mount_vfs_nochroot
This is significantly reworked from before. umount is gone as
discussed, and variable motion is minimised.
[PATCH 2/7] btrfs: Update btrfs_subvolume_list to take
Already provisionally ACKed. Previous comment was that cleanup could
be tidier. I looked into creating a new cleanup function for fs_buf,
but it isn't possible (or simple, anyway) in this
2009 Aug 13
7
[PATCHx7] Misc patches
...d, 2 insertions(+), 0 deletions(-)
diff --git a/daemon/mount.c b/daemon/mount.c
index d1b26fa..f593812 100644
--- a/daemon/mount.c
+++ b/daemon/mount.c
@@ -48,6 +48,8 @@ do_mount_vfs (const char *options, const char *vfstype,
char *mp;
char *error;
+ ABS_PATH (mountpoint, return -1);
+
is_root = strcmp (mountpoint, "/") == 0;
if (!root_mounted && !is_root) {
--
1.6.2.5