From: Brian Gix <brian.gix@intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: brian.gix@intel.com, inga.stotland@intel.com,
luiz.dentz@gmail.com, tedd.an@linux.intel.com,
marcel@holtmann.org
Subject: [PATCH BlueZ 2/6] obexd: Cleanup deprecated symbolic file permissions
Date: Tue, 23 Feb 2021 11:02:48 -0800 [thread overview]
Message-ID: <20210223190252.483784-3-brian.gix@intel.com> (raw)
In-Reply-To: <20210223190252.483784-1-brian.gix@intel.com>
---
obexd/plugins/filesystem.c | 18 +++++++++---------
obexd/plugins/ftp.c | 4 ++--
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;
}
--
2.25.4
next prev parent reply other threads:[~2021-02-23 19:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-23 19:02 [PATCH BlueZ 0/6] Cleanup: replace symbolic file permissions Brian Gix
2021-02-23 19:02 ` [PATCH BlueZ 1/6] mesh: Cleanup deprecated " Brian Gix
2021-02-23 19:37 ` Cleanup: replace " bluez.test.bot
2021-02-23 22:47 ` An, Tedd
2021-02-23 22:58 ` bluez.test.bot
2021-02-23 19:02 ` Brian Gix [this message]
2021-02-23 19:02 ` [PATCH BlueZ 3/6] peripheral: Cleanup deprecated " Brian Gix
2021-02-23 19:02 ` [PATCH BlueZ 4/6] profiles: " Brian Gix
2021-02-23 19:02 ` [PATCH BlueZ 5/6] src: " Brian Gix
2021-02-23 19:02 ` [PATCH BlueZ 6/6] tools: " Brian Gix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210223190252.483784-3-brian.gix@intel.com \
--to=brian.gix@intel.com \
--cc=inga.stotland@intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=tedd.an@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox