Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1521475

[PATCH v6 2/9] tpm: replace symbolic permission with octal for securityfs files

From Nayna Jain <nayna@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject [PATCH v6 2/9] tpm: replace symbolic permission with octal for securityfs files
Date 2016-11-14 11:10 +0100
Message-ID <sDmn8-5BA-29@gated-at.bofh.it> (permalink)
References <sDmn7-5BA-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


checkpatch.pl flags warning for symbolic permissions and suggests
to replace with octal value.

This patch changes securityfs pseudo files permission
to octal values in tpm_bios_log_setup().

Signed-off-by: Nayna Jain <nayna@linux.vnet.ibm.com>
---
 drivers/char/tpm/tpm_eventlog.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/char/tpm/tpm_eventlog.c b/drivers/char/tpm/tpm_eventlog.c
index 42b49c4..9467e31 100644
--- a/drivers/char/tpm/tpm_eventlog.c
+++ b/drivers/char/tpm/tpm_eventlog.c
@@ -378,7 +378,7 @@ struct dentry **tpm_bios_log_setup(const char *name)
 
 	bin_file =
 	    securityfs_create_file("binary_bios_measurements",
-				   S_IRUSR | S_IRGRP, tpm_dir,
+				   0440, tpm_dir,
 				   (void *)&tpm_binary_b_measurements_seqops,
 				   &tpm_bios_measurements_ops);
 	if (is_bad(bin_file))
@@ -386,7 +386,7 @@ struct dentry **tpm_bios_log_setup(const char *name)
 
 	ascii_file =
 	    securityfs_create_file("ascii_bios_measurements",
-				   S_IRUSR | S_IRGRP, tpm_dir,
+				   0440, tpm_dir,
 				   (void *)&tpm_ascii_b_measurements_seqops,
 				   &tpm_bios_measurements_ops);
 	if (is_bad(ascii_file))
-- 
2.5.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v6 0/9] tpm: cleanup/fixes in existing event log support  Nayna Jain <nayna@linux.vnet.ibm.com> - 2016-11-14 11:10 +0100
  [PATCH v6 9/9] tpm: cleanup of printk error messages Nayna Jain <nayna@linux.vnet.ibm.com> - 2016-11-14 11:10 +0100
    Re: [PATCH v6 9/9] tpm: cleanup of printk error messages Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-14 23:30 +0100
      Re: [PATCH v6 9/9] tpm: cleanup of printk error messages Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-15 01:20 +0100
  [PATCH v6 2/9] tpm: replace symbolic permission with octal for securityfs files Nayna Jain <nayna@linux.vnet.ibm.com> - 2016-11-14 11:10 +0100
    Re: [PATCH v6 2/9] tpm: replace symbolic permission with octal for  securityfs files Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-14 23:20 +0100
    Re: [PATCH v6 2/9] tpm: replace symbolic permission with octal for  securityfs files Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-14 23:30 +0100
      Re: [tpmdd-devel] [PATCH v6 2/9] tpm: replace symbolic permission  with octal for securityfs files Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-15 01:20 +0100
  [PATCH v6 4/9] tpm: drop tpm1_chip_register(/unregister) Nayna Jain <nayna@linux.vnet.ibm.com> - 2016-11-14 11:10 +0100
    Re: [PATCH v6 4/9] tpm: drop tpm1_chip_register(/unregister) Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-22 12:30 +0100
      Re: [PATCH v6 4/9] tpm: drop tpm1_chip_register(/unregister) Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-11-22 17:50 +0100
        Re: [PATCH v6 4/9] tpm: drop tpm1_chip_register(/unregister) Nayna <nayna@linux.vnet.ibm.com> - 2016-11-24 04:20 +0100
          Re: [PATCH v6 4/9] tpm: drop tpm1_chip_register(/unregister) Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-24 13:00 +0100
        Re: [PATCH v6 4/9] tpm: drop tpm1_chip_register(/unregister) Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-24 13:00 +0100
  [PATCH v6 5/9] tpm: have event log use the tpm_chip Nayna Jain <nayna@linux.vnet.ibm.com> - 2016-11-14 11:10 +0100
    Re: [PATCH v6 5/9] tpm: have event log use the tpm_chip Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-15 00:50 +0100
      Re: [PATCH v6 5/9] tpm: have event log use the tpm_chip Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-15 01:20 +0100
  [PATCH v6 6/9] tpm: fix the missing .owner in tpm_bios_measurements_ops Nayna Jain <nayna@linux.vnet.ibm.com> - 2016-11-14 11:10 +0100
    Re: [PATCH v6 6/9] tpm: fix the missing .owner in  tpm_bios_measurements_ops Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-14 23:30 +0100
      Re: [PATCH v6 6/9] tpm: fix the missing .owner in  tpm_bios_measurements_ops Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-15 01:20 +0100
  [PATCH v6 1/9] tpm: define a generic open() method for ascii & bios measurements Nayna Jain <nayna@linux.vnet.ibm.com> - 2016-11-14 11:10 +0100
  Re: [PATCH v6 0/9] tpm: cleanup/fixes in existing event log support Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-14 23:40 +0100
    Re: [PATCH v6 0/9] tpm: cleanup/fixes in existing event log support Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-15 01:30 +0100
      Re: [PATCH v6 0/9] tpm: cleanup/fixes in existing event log support Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-15 01:40 +0100
      Re: [PATCH v6 0/9] tpm: cleanup/fixes in existing event log support Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-15 03:20 +0100
        Re: [PATCH v6 0/9] tpm: cleanup/fixes in existing event log support Nayna <nayna@linux.vnet.ibm.com> - 2016-11-15 06:40 +0100
          Re: [PATCH v6 0/9] tpm: cleanup/fixes in existing event log support Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-15 18:50 +0100
            Re: [PATCH v6 0/9] tpm: cleanup/fixes in existing event log support Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-11-15 19:10 +0100
              Re: [PATCH v6 0/9] tpm: cleanup/fixes in existing event log support Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-15 20:00 +0100
                Re: [PATCH v6 0/9] tpm: cleanup/fixes in existing event log support Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-11-19 19:40 +0100
                Re: [PATCH v6 0/9] tpm: cleanup/fixes in existing event log support Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-20 11:00 +0100
                Re: [PATCH v6 0/9] tpm: cleanup/fixes in existing event log support Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-11-21 19:30 +0100

csiph-web