diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-11-01 15:04:41 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-11-01 15:05:25 +0200 |
commit | 3913675640f65bb4774429d369681957b528996e (patch) | |
tree | 3842765811fff15982312feea2fa014e3dfaabd2 | |
parent | b8feb2b14247d76200fd53607d3613c82b6e5b81 (diff) | |
download | tar-3913675640f65bb4774429d369681957b528996e.tar.gz |
Fix extraction of device nodes.
* src/extract.c (extract_node): Do not mask out node type.
The bug was introduced in commit ea964cce.
-rw-r--r-- | src/extract.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/extract.c b/src/extract.c index 44233b9e..6711f873 100644 --- a/src/extract.c +++ b/src/extract.c @@ -1205,7 +1205,7 @@ static int extract_node (char *file_name, int typeflag) { bool interdir_made = false; - mode_t mode = (current_stat_info.stat.st_mode & MODE_RWX + mode_t mode = (current_stat_info.stat.st_mode & (MODE_RWX | S_IFBLK | S_IFCHR) & ~ (0 < same_owner_option ? S_IRWXG | S_IRWXO : 0)); while (mknodat (chdir_fd, file_name, mode, current_stat_info.stat.st_rdev) |