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 6/6] tools: Cleanup deprecated symbolic file permissions
Date: Tue, 23 Feb 2021 11:02:52 -0800 [thread overview]
Message-ID: <20210223190252.483784-7-brian.gix@intel.com> (raw)
In-Reply-To: <20210223190252.483784-1-brian.gix@intel.com>
---
tools/btsnoop.c | 3 +--
tools/create-image.c | 3 +--
tools/hcidump.c | 2 +-
tools/rctest.c | 3 +--
4 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/tools/btsnoop.c b/tools/btsnoop.c
index 41baf6e3d..738027dfc 100644
--- a/tools/btsnoop.c
+++ b/tools/btsnoop.c
@@ -57,8 +57,7 @@ static int create_btsnoop(const char *path)
ssize_t written;
int fd;
- fd = open(path, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC,
- S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ fd = open(path, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0644);
if (fd < 0) {
perror("failed to output file");
return -1;
diff --git a/tools/create-image.c b/tools/create-image.c
index 3f2cf03d8..aba940da7 100644
--- a/tools/create-image.c
+++ b/tools/create-image.c
@@ -53,8 +53,7 @@
static unsigned int ino_cnt = 721;
-#define REG_EXE S_IFREG | \
- S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH
+#define REG_EXE S_IFREG | 0555
static const struct {
const char *source;
diff --git a/tools/hcidump.c b/tools/hcidump.c
index 2b08056ea..011864bc0 100644
--- a/tools/hcidump.c
+++ b/tools/hcidump.c
@@ -434,7 +434,7 @@ static int open_file(char *file, int mode, unsigned long flags)
else
open_flags = O_RDONLY;
- fd = open(file, open_flags, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ fd = open(file, open_flags, 0644);
if (fd < 0) {
perror("Can't open dump file");
exit(1);
diff --git a/tools/rctest.c b/tools/rctest.c
index 494359a88..7d688691c 100644
--- a/tools/rctest.c
+++ b/tools/rctest.c
@@ -631,8 +631,7 @@ static void automated_send_recv()
do_listen(recv_mode);
}
- save_fd = open(savefile, O_CREAT | O_WRONLY,
- S_IRUSR | S_IWUSR);
+ save_fd = open(savefile, O_CREAT | O_WRONLY, 0600);
if (save_fd < 0)
syslog(LOG_ERR, "Failed to open file to save data");
--
2.25.4
prev parent reply other threads:[~2021-02-23 19:05 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 ` [PATCH BlueZ 2/6] obexd: Cleanup deprecated " Brian Gix
2021-02-23 19:02 ` [PATCH BlueZ 3/6] peripheral: " 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 ` Brian Gix [this message]
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-7-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