amuck-landowner

[vzctl] Hotfix 4.9.1

Geek

Technolojesus
Verified Provider
A friend and I found a little bit o' regression in 4.9.  Examples are below.  If you're running 4.9 already you should probably update right quick.  Peace!

---------------------------------------------------------------------------------------------------

create_hardlink_dir(): fix wrong owner/perms case

In case CPT_HARDLINK_DIR exists, is a directory, but its
ownership and/or permissions are wrong, the best course
of action is not to remove it, but just fix what's wrong.
This is what this patch does.

In addition:

* mark create_hardlink_dir() as static (as it should be)
* report and return a potential error from stat() syscall,
  (as it should not happen and if it is, it's probably fatal)

This is an addition to commit 09e974f, also fixing bug #3222.

Reported-by: Pavel Odintsov <pavel.odintsov&&gmail.com>
Reported-by: John Edel <john&&jetfirenetworks.com>
Signed-off-by: Kir Kolyshkin <kir&&openvz.org>

Example:

Code:
@>ll
total 20980
-rw-r--r--   1 root root       140260 Jan 31  2014 #yum.lst#
drwxr-xr-x  25 root mailtrap     4096 Apr 30 06:17 ./
drwxr-xr-x  25 root mailtrap     4096 Apr 30 06:17 ../
-rw-r--r--   1 root root            0 Apr 30 04:43 .autofsck
-rw-r--r--   1 root root            0 Apr 14 13:38 .autorelabel
drwx--x--x   2 root root         4096 Apr 25 05:46 .cpt_hardlink_dir_a920e4ddc233afddc9fb53d26c392319/
 
Last edited by a moderator:
Top
amuck-landowner