Diff between a508def9a91abc5ba16bbc64169e76974130db76 and 58fb6dce58b119439cc513405e791a4910731eda

Changed Files

File Additions Deletions Status
tools/btsnoop.c +1 -2 modified
tools/create-image.c +1 -2 modified
tools/hcidump.c +1 -1 modified
tools/rctest.c +1 -2 modified

Full Patch

diff --git a/tools/btsnoop.c b/tools/btsnoop.c
index 41baf6e..738027d 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 3f2cf03..aba940d 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 2b08056..011864b 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 494359a..7d68869 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");