Package: partclone
Version: 0.2.88-1
Severity: normal
Tags: patch
--- Please enter the report below this line. ---
If partclone(.ext4 in my case) is run as a non-root user (i.e. to write
an image to a file from a backup), it emits a warning:
> You are not logged as root. You may have "access denied" errors when >
working.
. but then just exits.
Attached is a patch, that disables the automatic exit, as the warning
already suggests that it would not just exit.
The call that triggerd this for me was:
cat sdc1.ext4-ptcl-img.gz.a* | gzip -d -c | /usr/sbin/partclone.ext4 -r
--restore_raw_file -s - -O sdc1.img -L mylog.log
Regards
nautsch
--- System information. ---
Architecture: amd64
Kernel: Linux 4.5.0-2-amd64
Debian Release: stretch/sid
500 unstable ftp.de.debian.org 1 experimental
ftp.de.debian.org
--- Package information. ---
Depends (Version) | Installed
=============================-+-============
e2fslibs (>= 1.42) | 1.43-3
libblkid1 (>= 2.17.2) | 2.28-5
libc6 (>= 2.14) | libcomerr2 (>= 1.01) |
libncursesw5 (>= 6) | libntfs-3g871 |
libtinfo5 (>= 6) | libuuid1 (>= 2.16) |
nilfs-tools |
Package's Recommends field is empty.
Package's Suggests field is empty.
Index: partclone-0.2.88/src/main.c
===================================================================
--- partclone-0.2.88.orig/src/main.c
+++ partclone-0.2.88/src/main.c
@@ -201,7 +201,7 @@ int main(int argc, char **argv) {
#ifndef CHKIMG
if (geteuid() != 0)
- log_mesg(0, 1, 1, debug, "You are not logged as root. You may have \"access denied\" errors when working.\n");
+ log_mesg(0, 0, 1, debug, "You are not logged as root. You may have \"access denied\" errors when working.\n");
else
log_mesg(1, 0, 0, debug, "UID is root.\n");
#endif