On 04/14/20 07:15, Mike Christie wrote:
+static ssize_t session_acl_show(struct se_session *se_sess, char *page)
+{
+ struct se_node_acl *acl;
+ ssize_t len;
+
+ acl = se_sess->se_node_acl;
+ if (!acl)
+ return -ENOTCONN;
+
+ if (acl->dynamic_node_acl) {
+ page[0] = '\0';
+ len = 0;
+ } else {
+ len = snprintf(page, PAGE_SIZE, "%s\n", acl->initiatorname);
+ }
+
+ return len;
+}
Would it be a good idea to provide more info about initiators using
dynamic acl?
For example the file could be named "initiatorname" instead of "acl" and
always provide the initiatorname, while a boolean file "acl" could
return "Y" or "1" for explicit acls, but "N" or "0" for dynamic acls.