Skip to content

Commit fe47dba

Browse files
authored
Merge pull request #153 from giuseppe/drop-security-capability-handling
main: drop special handling for security.capability
2 parents e0d2ffa + 5d05320 commit fe47dba

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

fuse-overlayfs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ struct ovl_node
5757
unsigned int hidden : 1;
5858
unsigned int whiteout : 1;
5959
unsigned int loaded : 1;
60-
unsigned int no_security_capability : 1;
6160
};
6261

6362
struct ovl_mapping

main.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2253,7 +2253,6 @@ ovl_getxattr (fuse_req_t req, fuse_ino_t ino, const char *name, size_t size)
22532253
struct ovl_node *node;
22542254
struct ovl_data *lo = ovl_data (req);
22552255
cleanup_free char *buf = NULL;
2256-
bool is_security_capability = false;
22572256
int ret;
22582257

22592258
if (UNLIKELY (ovl_debug (req)))
@@ -2265,22 +2264,13 @@ ovl_getxattr (fuse_req_t req, fuse_ino_t ino, const char *name, size_t size)
22652264
return;
22662265
}
22672266

2268-
if (get_timeout (lo) > 0)
2269-
is_security_capability = has_prefix (name, "security.capability");
2270-
22712267
node = do_lookup_file (lo, ino, NULL);
22722268
if (node == NULL)
22732269
{
22742270
fuse_reply_err (req, ENOENT);
22752271
return;
22762272
}
22772273

2278-
if (is_security_capability && node->no_security_capability)
2279-
{
2280-
fuse_reply_err (req, ENODATA);
2281-
return;
2282-
}
2283-
22842274
if (size > 0)
22852275
{
22862276
buf = malloc (size);
@@ -2300,9 +2290,6 @@ ovl_getxattr (fuse_req_t req, fuse_ino_t ino, const char *name, size_t size)
23002290
ret = getxattr (path, name, buf, size);
23012291
}
23022292

2303-
if (get_timeout (lo) > 0 && is_security_capability && ret < 0 && errno == ENODATA)
2304-
node->no_security_capability = 1;
2305-
23062293
if (ret < 0)
23072294
{
23082295
fuse_reply_err (req, errno);
@@ -3002,7 +2989,6 @@ ovl_setxattr (fuse_req_t req, fuse_ino_t ino, const char *name,
30022989
{
30032990
cleanup_lock int l = enter_big_lock ();
30042991
struct ovl_data *lo = ovl_data (req);
3005-
bool is_security_capability = false;
30062992
struct ovl_node *node;
30072993
int ret;
30082994

@@ -3022,8 +3008,6 @@ ovl_setxattr (fuse_req_t req, fuse_ino_t ino, const char *name,
30223008
return;
30233009
}
30243010

3025-
is_security_capability = has_prefix (name, "security.capability");
3026-
30273011
node = do_lookup_file (lo, ino, NULL);
30283012
if (node == NULL)
30293013
{
@@ -3052,7 +3036,6 @@ ovl_setxattr (fuse_req_t req, fuse_ino_t ino, const char *name,
30523036
return;
30533037
}
30543038

3055-
node->no_security_capability = 1;
30563039
fuse_reply_err (req, 0);
30573040
}
30583041

@@ -4543,7 +4526,6 @@ ovl_mkdir (fuse_req_t req, fuse_ino_t parent, const char *name, mode_t mode)
45434526
node->last_layer = pnode->last_layer;
45444527
if (get_timeout (lo) > 0)
45454528
node->loaded = 1;
4546-
node->no_security_capability = 1;
45474529
}
45484530
else
45494531
{

0 commit comments

Comments
 (0)