summaryrefslogtreecommitdiff
path: root/obexd
diff options
context:
space:
mode:
authorBrian Gix <brian.gix@intel.com>2021-02-23 10:36:38 -0800
committerBrian Gix <brian.gix@intel.com>2021-02-23 16:59:46 -0800
commitc8a47b6d67a2941e657212746fa470f8add9c443 (patch)
tree53992a4a127fee6e89f926948324f74bf6495e89 /obexd
parentb02298efd3d3f88bccfe3b0b150b96b5e45cf81d (diff)
downloadbluez-c8a47b6d67a2941e657212746fa470f8add9c443.tar.gz
obexd: Cleanup deprecated symbolic file permissions
Diffstat (limited to 'obexd')
-rw-r--r--obexd/plugins/filesystem.c18
-rw-r--r--obexd/plugins/ftp.c4
2 files changed, 11 insertions, 11 deletions
diff --git a/obexd/plugins/filesystem.c b/obexd/plugins/filesystem.c
index 8e53c181c..09bff8ad0 100644
--- a/obexd/plugins/filesystem.c
+++ b/obexd/plugins/filesystem.c
@@ -116,15 +116,15 @@ static char *file_stat_line(char *filename, struct stat *fstat,
snprintf(perm, 50, "user-perm=\"%s%s%s\" group-perm=\"%s%s%s\" "
"other-perm=\"%s%s%s\"",
- (fstat->st_mode & S_IRUSR ? "R" : ""),
- (fstat->st_mode & S_IWUSR ? "W" : ""),
- (dstat->st_mode & S_IWUSR ? "D" : ""),
- (fstat->st_mode & S_IRGRP ? "R" : ""),
- (fstat->st_mode & S_IWGRP ? "W" : ""),
- (dstat->st_mode & S_IWGRP ? "D" : ""),
- (fstat->st_mode & S_IROTH ? "R" : ""),
- (fstat->st_mode & S_IWOTH ? "W" : ""),
- (dstat->st_mode & S_IWOTH ? "D" : ""));
+ (fstat->st_mode & 0400 ? "R" : ""),
+ (fstat->st_mode & 0200 ? "W" : ""),
+ (dstat->st_mode & 0200 ? "D" : ""),
+ (fstat->st_mode & 0040 ? "R" : ""),
+ (fstat->st_mode & 0020 ? "W" : ""),
+ (dstat->st_mode & 0020 ? "D" : ""),
+ (fstat->st_mode & 0004 ? "R" : ""),
+ (fstat->st_mode & 0002 ? "W" : ""),
+ (dstat->st_mode & 0002 ? "D" : ""));
strftime(atime, 17, "%Y%m%dT%H%M%SZ", gmtime(&fstat->st_atime));
strftime(ctime, 17, "%Y%m%dT%H%M%SZ", gmtime(&fstat->st_ctime));
diff --git a/obexd/plugins/ftp.c b/obexd/plugins/ftp.c
index f60cf143d..259bfcae2 100644
--- a/obexd/plugins/ftp.c
+++ b/obexd/plugins/ftp.c
@@ -284,8 +284,8 @@ int ftp_setpath(struct obex_session *os, void *user_data)
goto done;
}
- if (S_ISDIR(dstat.st_mode) && (dstat.st_mode & S_IRUSR) &&
- (dstat.st_mode & S_IXUSR)) {
+ if (S_ISDIR(dstat.st_mode) && (dstat.st_mode & 0400) &&
+ (dstat.st_mode & 0100)) {
set_folder(ftp, fullname);
goto done;
}