All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ 0/6] Cleanup: replace symbolic file permissions
@ 2021-02-23 19:02 Brian Gix
  2021-02-23 19:02 ` [PATCH BlueZ 1/6] mesh: Cleanup deprecated " Brian Gix
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Brian Gix @ 2021-02-23 19:02 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: brian.gix, inga.stotland, luiz.dentz, tedd.an, marcel

The kernel has moved away from using Symbolic File Permission macros,
and this is reflected in our checkpatch usage which flags lines which
still use them.  The preferred method is to use the well known octal
notation, for instance 0755 meaning:

User has read/write/execute permissions
Group has read/execute permissions
Other has read/execute permissions

Brian Gix (6):
  mesh: Cleanup deprecated symbolic file permissions
  obexd: Cleanup deprecated symbolic file permissions
  peripheral: Cleanup deprecated symbolic file permissions
  profiles: Cleanup deprecated symbolic file permissions
  src: Cleanup deprecated symbolic file permissions
  tools: Cleanup deprecated symbolic file permissions

 mesh/rpl.c                     |  2 +-
 obexd/plugins/filesystem.c     | 18 +++++++++---------
 obexd/plugins/ftp.c            |  4 ++--
 peripheral/efivars.c           |  3 +--
 profiles/input/suspend-dummy.c |  2 +-
 src/adapter.c                  | 32 ++++++++++++++++----------------
 src/attrib-server.c            |  2 +-
 src/device.c                   | 16 ++++++++--------
 src/sdpd-server.c              |  2 +-
 src/shared/btsnoop.c           |  4 ++--
 src/textfile.c                 |  2 +-
 tools/btsnoop.c                |  3 +--
 tools/create-image.c           |  3 +--
 tools/hcidump.c                |  2 +-
 tools/rctest.c                 |  3 +--
 15 files changed, 47 insertions(+), 51 deletions(-)

-- 
2.25.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH BlueZ 1/6] mesh: Cleanup deprecated symbolic file permissions
  2021-02-23 19:02 [PATCH BlueZ 0/6] Cleanup: replace symbolic file permissions Brian Gix
@ 2021-02-23 19:02 ` Brian Gix
  2021-02-23 19:37   ` Cleanup: replace " bluez.test.bot
  2021-02-23 22:58   ` bluez.test.bot
  2021-02-23 19:02 ` [PATCH BlueZ 2/6] obexd: Cleanup deprecated " Brian Gix
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 10+ messages in thread
From: Brian Gix @ 2021-02-23 19:02 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: brian.gix, inga.stotland, luiz.dentz, tedd.an, marcel

---
 mesh/rpl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mesh/rpl.c b/mesh/rpl.c
index 7cea8e346..ac0f6b6f2 100644
--- a/mesh/rpl.c
+++ b/mesh/rpl.c
@@ -62,7 +62,7 @@ bool rpl_put_entry(struct mesh_node *node, uint16_t src, uint32_t iv_index,
 	snprintf(src_file, PATH_MAX, "%s%s/%8.8x/%4.4x", node_path, rpl_dir,
 								iv_index, src);
 
-	fd = open(src_file, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
+	fd = open(src_file, O_WRONLY | O_CREAT | O_TRUNC, 0600);
 	if (fd >= 0) {
 		snprintf(seq_txt, 7, "%6.6x", seq);
 		if (write(fd, seq_txt, 6) == 6)
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH BlueZ 2/6] obexd: Cleanup deprecated symbolic file permissions
  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:02 ` Brian Gix
  2021-02-23 19:02 ` [PATCH BlueZ 3/6] peripheral: " Brian Gix
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Brian Gix @ 2021-02-23 19:02 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: brian.gix, inga.stotland, luiz.dentz, tedd.an, marcel

---
 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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH BlueZ 3/6] peripheral: Cleanup deprecated symbolic file permissions
  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:02 ` [PATCH BlueZ 2/6] obexd: Cleanup deprecated " Brian Gix
@ 2021-02-23 19:02 ` Brian Gix
  2021-02-23 19:02 ` [PATCH BlueZ 4/6] profiles: " Brian Gix
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Brian Gix @ 2021-02-23 19:02 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: brian.gix, inga.stotland, luiz.dentz, tedd.an, marcel

---
 peripheral/efivars.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/peripheral/efivars.c b/peripheral/efivars.c
index 74fceed3e..987572b63 100644
--- a/peripheral/efivars.c
+++ b/peripheral/efivars.c
@@ -98,8 +98,7 @@ int efivars_write(const char *name, uint32_t attributes,
 	if (!buf)
 		return -ENOMEM;
 
-	fd = open(pathname, O_CREAT | O_WRONLY | O_TRUNC | O_CLOEXEC,
-				S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+	fd = open(pathname, O_CREAT | O_WRONLY | O_TRUNC | O_CLOEXEC, 0644);
 	if (fd < 0) {
 		free(buf);
 		return -EIO;
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH BlueZ 4/6] profiles: Cleanup deprecated symbolic file permissions
  2021-02-23 19:02 [PATCH BlueZ 0/6] Cleanup: replace symbolic file permissions Brian Gix
                   ` (2 preceding siblings ...)
  2021-02-23 19:02 ` [PATCH BlueZ 3/6] peripheral: " Brian Gix
@ 2021-02-23 19:02 ` 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
  5 siblings, 0 replies; 10+ messages in thread
From: Brian Gix @ 2021-02-23 19:02 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: brian.gix, inga.stotland, luiz.dentz, tedd.an, marcel

---
 profiles/input/suspend-dummy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/profiles/input/suspend-dummy.c b/profiles/input/suspend-dummy.c
index c6527ee88..ea1835e0f 100644
--- a/profiles/input/suspend-dummy.c
+++ b/profiles/input/suspend-dummy.c
@@ -121,7 +121,7 @@ int suspend_init(suspend_event suspend, resume_event resume)
 		}
 	}
 
-	if (mkfifo(HOG_SUSPEND_FIFO, S_IRUSR | S_IWUSR) < 0) {
+	if (mkfifo(HOG_SUSPEND_FIFO, 0600) < 0) {
 		int err = -errno;
 
 		error("Can't create FIFO (%s): %s (%d)", HOG_SUSPEND_FIFO,
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH BlueZ 5/6] src: Cleanup deprecated symbolic file permissions
  2021-02-23 19:02 [PATCH BlueZ 0/6] Cleanup: replace symbolic file permissions Brian Gix
                   ` (3 preceding siblings ...)
  2021-02-23 19:02 ` [PATCH BlueZ 4/6] profiles: " Brian Gix
@ 2021-02-23 19:02 ` Brian Gix
  2021-02-23 19:02 ` [PATCH BlueZ 6/6] tools: " Brian Gix
  5 siblings, 0 replies; 10+ messages in thread
From: Brian Gix @ 2021-02-23 19:02 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: brian.gix, inga.stotland, luiz.dentz, tedd.an, marcel

---
 src/adapter.c        | 32 ++++++++++++++++----------------
 src/attrib-server.c  |  2 +-
 src/device.c         | 16 ++++++++--------
 src/sdpd-server.c    |  2 +-
 src/shared/btsnoop.c |  4 ++--
 src/textfile.c       |  2 +-
 6 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index 0b6321dd5..051c32753 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -502,7 +502,7 @@ static void store_adapter_info(struct btd_adapter *adapter)
 	snprintf(filename, PATH_MAX, STORAGEDIR "/%s/settings",
 					btd_adapter_get_storage_dir(adapter));
 
-	create_file(filename, S_IRUSR | S_IWUSR);
+	create_file(filename, 0600);
 
 	str = g_key_file_to_data(key_file, &length, NULL);
 	g_file_set_contents(filename, str, length, NULL);
@@ -5427,7 +5427,7 @@ static void convert_names_entry(char *key, char *value, void *user_data)
 		return;
 
 	snprintf(filename, PATH_MAX, STORAGEDIR "/%s/cache/%s", address, str);
-	create_file(filename, S_IRUSR | S_IWUSR);
+	create_file(filename, 0600);
 
 	key_file = g_key_file_new();
 	g_key_file_load_from_file(key_file, filename, 0, NULL);
@@ -5663,7 +5663,7 @@ static void convert_entry(char *key, char *value, void *user_data)
 
 	data = g_key_file_to_data(key_file, &length, NULL);
 	if (length > 0) {
-		create_file(filename, S_IRUSR | S_IWUSR);
+		create_file(filename, 0600);
 		g_file_set_contents(filename, data, length, NULL);
 	}
 
@@ -5759,7 +5759,7 @@ static void store_sdp_record(char *local, char *peer, int handle, char *value)
 
 	data = g_key_file_to_data(key_file, &length, NULL);
 	if (length > 0) {
-		create_file(filename, S_IRUSR | S_IWUSR);
+		create_file(filename, 0600);
 		g_file_set_contents(filename, data, length, NULL);
 	}
 
@@ -5833,7 +5833,7 @@ static void convert_sdp_entry(char *key, char *value, void *user_data)
 
 	data = g_key_file_to_data(key_file, &length, NULL);
 	if (length > 0) {
-		create_file(filename, S_IRUSR | S_IWUSR);
+		create_file(filename, 0600);
 		g_file_set_contents(filename, data, length, NULL);
 	}
 
@@ -5898,7 +5898,7 @@ static void convert_primaries_entry(char *key, char *value, void *user_data)
 	if (length == 0)
 		goto end;
 
-	create_file(filename, S_IRUSR | S_IWUSR);
+	create_file(filename, 0600);
 	g_file_set_contents(filename, data, length, NULL);
 
 	if (device_type < 0)
@@ -5915,7 +5915,7 @@ static void convert_primaries_entry(char *key, char *value, void *user_data)
 
 	data = g_key_file_to_data(key_file, &length, NULL);
 	if (length > 0) {
-		create_file(filename, S_IRUSR | S_IWUSR);
+		create_file(filename, 0600);
 		g_file_set_contents(filename, data, length, NULL);
 	}
 
@@ -5964,7 +5964,7 @@ static void convert_ccc_entry(char *key, char *value, void *user_data)
 
 	data = g_key_file_to_data(key_file, &length, NULL);
 	if (length > 0) {
-		create_file(filename, S_IRUSR | S_IWUSR);
+		create_file(filename, 0600);
 		g_file_set_contents(filename, data, length, NULL);
 	}
 
@@ -6011,7 +6011,7 @@ static void convert_gatt_entry(char *key, char *value, void *user_data)
 
 	data = g_key_file_to_data(key_file, &length, NULL);
 	if (length > 0) {
-		create_file(filename, S_IRUSR | S_IWUSR);
+		create_file(filename, 0600);
 		g_file_set_contents(filename, data, length, NULL);
 	}
 
@@ -6056,7 +6056,7 @@ static void convert_proximity_entry(char *key, char *value, void *user_data)
 
 	data = g_key_file_to_data(key_file, &length, NULL);
 	if (length > 0) {
-		create_file(filename, S_IRUSR | S_IWUSR);
+		create_file(filename, 0600);
 		g_file_set_contents(filename, data, length, NULL);
 	}
 
@@ -6154,7 +6154,7 @@ static void convert_config(struct btd_adapter *adapter, const char *filename,
 	if (read_local_name(&adapter->bdaddr, str) == 0)
 		g_key_file_set_string(key_file, "General", "Alias", str);
 
-	create_file(filename, S_IRUSR | S_IWUSR);
+	create_file(filename, 0600);
 
 	data = g_key_file_to_data(key_file, &length, NULL);
 	g_file_set_contents(filename, data, length, NULL);
@@ -7962,7 +7962,7 @@ static void store_link_key(struct btd_adapter *adapter,
 	g_key_file_set_integer(key_file, "LinkKey", "Type", type);
 	g_key_file_set_integer(key_file, "LinkKey", "PINLength", pin_length);
 
-	create_file(filename, S_IRUSR | S_IWUSR);
+	create_file(filename, 0600);
 
 	str = g_key_file_to_data(key_file, &length, NULL);
 	g_file_set_contents(filename, str, length, NULL);
@@ -8059,7 +8059,7 @@ static void store_longtermkey(struct btd_adapter *adapter, const bdaddr_t *peer,
 	g_key_file_set_integer(key_file, group, "EDiv", ediv);
 	g_key_file_set_uint64(key_file, group, "Rand", rand);
 
-	create_file(filename, S_IRUSR | S_IWUSR);
+	create_file(filename, 0600);
 
 	str = g_key_file_to_data(key_file, &length, NULL);
 	g_file_set_contents(filename, str, length, NULL);
@@ -8183,7 +8183,7 @@ static void store_csrk(struct btd_adapter *adapter, const bdaddr_t *peer,
 	g_key_file_set_integer(key_file, group, "Counter", counter);
 	g_key_file_set_boolean(key_file, group, "Authenticated", auth);
 
-	create_file(filename, S_IRUSR | S_IWUSR);
+	create_file(filename, 0600);
 
 	str = g_key_file_to_data(key_file, &length, NULL);
 	g_file_set_contents(filename, str, length, NULL);
@@ -8251,7 +8251,7 @@ static void store_irk(struct btd_adapter *adapter, const bdaddr_t *peer,
 
 	g_key_file_set_string(key_file, "IdentityResolvingKey", "Key", str);
 
-	create_file(filename, S_IRUSR | S_IWUSR);
+	create_file(filename, 0600);
 
 	store_data = g_key_file_to_data(key_file, &length, NULL);
 	g_file_set_contents(filename, store_data, length, NULL);
@@ -8343,7 +8343,7 @@ static void store_conn_param(struct btd_adapter *adapter, const bdaddr_t *peer,
 	g_key_file_set_integer(key_file, "ConnectionParameters",
 						"Timeout", timeout);
 
-	create_file(filename, S_IRUSR | S_IWUSR);
+	create_file(filename, 0600);
 
 	store_data = g_key_file_to_data(key_file, &length, NULL);
 	g_file_set_contents(filename, store_data, length, NULL);
diff --git a/src/attrib-server.c b/src/attrib-server.c
index 91a10b274..5a178f95e 100644
--- a/src/attrib-server.c
+++ b/src/attrib-server.c
@@ -919,7 +919,7 @@ static uint16_t write_value(struct gatt_channel *channel, uint16_t handle,
 
 		data = g_key_file_to_data(key_file, &length, NULL);
 		if (length > 0) {
-			create_file(filename, S_IRUSR | S_IWUSR);
+			create_file(filename, 0600);
 			g_file_set_contents(filename, data, length, NULL);
 		}
 
diff --git a/src/device.c b/src/device.c
index af13badfc..dfba6ee47 100644
--- a/src/device.c
+++ b/src/device.c
@@ -463,7 +463,7 @@ static gboolean store_device_info_cb(gpointer user_data)
 	if (device->remote_csrk)
 		store_csrk(device->remote_csrk, key_file, "RemoteSignatureKey");
 
-	create_file(filename, S_IRUSR | S_IWUSR);
+	create_file(filename, 0600);
 
 	str = g_key_file_to_data(key_file, &length, NULL);
 	g_file_set_contents(filename, str, length, NULL);
@@ -522,7 +522,7 @@ void device_store_cached_name(struct btd_device *dev, const char *name)
 	ba2str(&dev->bdaddr, d_addr);
 	snprintf(filename, PATH_MAX, STORAGEDIR "/%s/cache/%s",
 			btd_adapter_get_storage_dir(dev->adapter), d_addr);
-	create_file(filename, S_IRUSR | S_IWUSR);
+	create_file(filename, 0600);
 
 	key_file = g_key_file_new();
 	g_key_file_load_from_file(key_file, filename, 0, NULL);
@@ -2290,7 +2290,7 @@ static void store_services(struct btd_device *device)
 
 	data = g_key_file_to_data(key_file, &length, NULL);
 	if (length > 0) {
-		create_file(filename, S_IRUSR | S_IWUSR);
+		create_file(filename, 0600);
 		g_file_set_contents(filename, data, length, NULL);
 	}
 
@@ -2478,7 +2478,7 @@ static void store_gatt_db(struct btd_device *device)
 	snprintf(filename, PATH_MAX, STORAGEDIR "/%s/cache/%s",
 				btd_adapter_get_storage_dir(device->adapter),
 				dst_addr);
-	create_file(filename, S_IRUSR | S_IWUSR);
+	create_file(filename, 0600);
 
 	key_file = g_key_file_new();
 	g_key_file_load_from_file(key_file, filename, 0, NULL);
@@ -4439,7 +4439,7 @@ static void device_remove_stored(struct btd_device *device)
 
 	data = g_key_file_to_data(key_file, &length, NULL);
 	if (length > 0) {
-		create_file(filename, S_IRUSR | S_IWUSR);
+		create_file(filename, 0600);
 		g_file_set_contents(filename, data, length, NULL);
 	}
 
@@ -4889,7 +4889,7 @@ next:
 	if (sdp_key_file) {
 		data = g_key_file_to_data(sdp_key_file, &length, NULL);
 		if (length > 0) {
-			create_file(sdp_file, S_IRUSR | S_IWUSR);
+			create_file(sdp_file, 0600);
 			g_file_set_contents(sdp_file, data, length, NULL);
 		}
 
@@ -4900,7 +4900,7 @@ next:
 	if (att_key_file) {
 		data = g_key_file_to_data(att_key_file, &length, NULL);
 		if (length > 0) {
-			create_file(att_file, S_IRUSR | S_IWUSR);
+			create_file(att_file, 0600);
 			g_file_set_contents(att_file, data, length, NULL);
 		}
 
@@ -5807,7 +5807,7 @@ void device_store_svc_chng_ccc(struct btd_device *device, uint8_t bdaddr_type,
 									value);
 	}
 
-	create_file(filename, S_IRUSR | S_IWUSR);
+	create_file(filename, 0600);
 
 	str = g_key_file_to_data(key_file, &length, NULL);
 	g_file_set_contents(filename, str, length, NULL);
diff --git a/src/sdpd-server.c b/src/sdpd-server.c
index dfd8b1f00..306b92a44 100644
--- a/src/sdpd-server.c
+++ b/src/sdpd-server.c
@@ -130,7 +130,7 @@ static int init_server(uint16_t mtu, int master, int compat)
 		return -1;
 	}
 
-	chmod(SDP_UNIX_PATH, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
+	chmod(SDP_UNIX_PATH, 0660);
 
 	return 0;
 }
diff --git a/src/shared/btsnoop.c b/src/shared/btsnoop.c
index e2b3747e3..a29bc928f 100644
--- a/src/shared/btsnoop.c
+++ b/src/shared/btsnoop.c
@@ -151,7 +151,7 @@ struct btsnoop *btsnoop_create(const char *path, size_t max_size,
 	}
 
 	btsnoop->fd = open(real_path, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC,
-					S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+									0644);
 	if (btsnoop->fd < 0) {
 		free(btsnoop);
 		return NULL;
@@ -230,7 +230,7 @@ static bool btsnoop_rotate(struct btsnoop *btsnoop)
 	btsnoop->cur_count++;
 
 	btsnoop->fd = open(path, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC,
-					S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+									0644);
 	if (btsnoop->fd < 0)
 		return false;
 
diff --git a/src/textfile.c b/src/textfile.c
index 7dd62392b..8c8d509b4 100644
--- a/src/textfile.c
+++ b/src/textfile.c
@@ -65,7 +65,7 @@ int create_file(const char *filename, const mode_t mode)
 {
 	int fd;
 
-	create_dirs(filename, S_IRUSR | S_IWUSR | S_IXUSR);
+	create_dirs(filename, 0700);
 
 	fd = open(filename, O_RDWR | O_CREAT, mode);
 	if (fd < 0)
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH BlueZ 6/6] tools: Cleanup deprecated symbolic file permissions
  2021-02-23 19:02 [PATCH BlueZ 0/6] Cleanup: replace symbolic file permissions Brian Gix
                   ` (4 preceding siblings ...)
  2021-02-23 19:02 ` [PATCH BlueZ 5/6] src: " Brian Gix
@ 2021-02-23 19:02 ` Brian Gix
  5 siblings, 0 replies; 10+ messages in thread
From: Brian Gix @ 2021-02-23 19:02 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: brian.gix, inga.stotland, luiz.dentz, tedd.an, marcel

---
 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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* RE: Cleanup: replace symbolic file permissions
  2021-02-23 19:02 ` [PATCH BlueZ 1/6] mesh: Cleanup deprecated " Brian Gix
@ 2021-02-23 19:37   ` bluez.test.bot
  2021-02-23 22:47     ` An, Tedd
  2021-02-23 22:58   ` bluez.test.bot
  1 sibling, 1 reply; 10+ messages in thread
From: bluez.test.bot @ 2021-02-23 19:37 UTC (permalink / raw)
  To: linux-bluetooth, brian.gix

[-- Attachment #1: Type: text/plain, Size: 1460 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=437329

---Test result---

##############################
Test: CheckPatch - PASS

##############################
Test: CheckGitLint - FAIL
Output:
mesh: Cleanup deprecated symbolic file permissions
3: B6 Body message is missing

obexd: Cleanup deprecated symbolic file permissions
3: B6 Body message is missing

peripheral: Cleanup deprecated symbolic file permissions
3: B6 Body message is missing

profiles: Cleanup deprecated symbolic file permissions
3: B6 Body message is missing

src: Cleanup deprecated symbolic file permissions
3: B6 Body message is missing

tools: Cleanup deprecated symbolic file permissions
3: B6 Body message is missing


##############################
Test: CheckBuild - FAIL
Output:
configure.ac:21: installing './compile'
configure.ac:33: installing './config.guess'
configure.ac:33: installing './config.sub'
configure.ac:5: installing './install-sh'
configure.ac:5: installing './missing'
Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
configure: error: Embedded Linux library >= 0.37 is required


##############################
Test: MakeCheck - SKIPPED
Output:
checkbuild not success



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Cleanup: replace symbolic file permissions
  2021-02-23 19:37   ` Cleanup: replace " bluez.test.bot
@ 2021-02-23 22:47     ` An, Tedd
  0 siblings, 0 replies; 10+ messages in thread
From: An, Tedd @ 2021-02-23 22:47 UTC (permalink / raw)
  To: linux-bluetooth, Gix, Brian

Hi Brian,

On 2/23/21, 11:40 AM, "bluez.test.bot@gmail.com" <bluez.test.bot@gmail.com> wrote:

    This is automated email and please do not reply to this email!

    Dear submitter,

    Thank you for submitting the patches to the linux bluetooth mailing list.
    This is a CI test results with your patch series:
    PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=437329

    ---Test result---

    ##############################
    Test: CheckPatch - PASS

    ##############################
    Test: CheckGitLint - FAIL
    Output:
    mesh: Cleanup deprecated symbolic file permissions
    3: B6 Body message is missing

    obexd: Cleanup deprecated symbolic file permissions
    3: B6 Body message is missing

    peripheral: Cleanup deprecated symbolic file permissions
    3: B6 Body message is missing

    profiles: Cleanup deprecated symbolic file permissions
    3: B6 Body message is missing

    src: Cleanup deprecated symbolic file permissions
    3: B6 Body message is missing

    tools: Cleanup deprecated symbolic file permissions
    3: B6 Body message is missing


    ##############################
    Test: CheckBuild - FAIL
    Output:
    configure.ac:21: installing './compile'
    configure.ac:33: installing './config.guess'
    configure.ac:33: installing './config.sub'
    configure.ac:5: installing './install-sh'
    configure.ac:5: installing './missing'
    Makefile.am: installing './depcomp'
    parallel-tests: installing './test-driver'
    configure: error: Embedded Linux library >= 0.37 is required

There was an issue with Docker image and it is resolved by now.
Please wait for the next test result.

    ##############################
    Test: MakeCheck - SKIPPED
    Output:
    checkbuild not success



    ---
    Regards,
    Linux Bluetooth



^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Cleanup: replace symbolic file permissions
  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:58   ` bluez.test.bot
  1 sibling, 0 replies; 10+ messages in thread
From: bluez.test.bot @ 2021-02-23 22:58 UTC (permalink / raw)
  To: linux-bluetooth, brian.gix

[-- Attachment #1: Type: text/plain, Size: 1068 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=437329

---Test result---

##############################
Test: CheckPatch - PASS

##############################
Test: CheckGitLint - FAIL
Output:
mesh: Cleanup deprecated symbolic file permissions
3: B6 Body message is missing

obexd: Cleanup deprecated symbolic file permissions
3: B6 Body message is missing

peripheral: Cleanup deprecated symbolic file permissions
3: B6 Body message is missing

profiles: Cleanup deprecated symbolic file permissions
3: B6 Body message is missing

src: Cleanup deprecated symbolic file permissions
3: B6 Body message is missing

tools: Cleanup deprecated symbolic file permissions
3: B6 Body message is missing


##############################
Test: CheckBuild - PASS

##############################
Test: MakeCheck - PASS



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-02-23 23:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH BlueZ 6/6] tools: " Brian Gix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.