* [2.6 patch] security/: possible cleanups
@ 2005-05-16 18:45 Adrian Bunk
2005-05-16 21:08 ` Chris Wright
0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2005-05-16 18:45 UTC (permalink / raw)
To: chrisw; +Cc: linux-security-module, linux-kernel
This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 the following unused global function:
- keys/key.c: key_duplicate
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
security/keys/internal.h | 1 -
security/keys/key.c | 4 +++-
security/keys/keyring.c | 2 +-
security/seclvl.c | 4 ++--
4 files changed, 6 insertions(+), 5 deletions(-)
--- linux-2.6.12-rc4-mm1-full/security/keys/internal.h.old 2005-05-15 17:11:19.000000000 +0200
+++ linux-2.6.12-rc4-mm1-full/security/keys/internal.h 2005-05-15 17:11:23.000000000 +0200
@@ -25,7 +25,6 @@
#define kdebug(FMT, a...) do {} while(0)
#endif
-extern struct key_type key_type_dead;
extern struct key_type key_type_user;
/*****************************************************************************/
--- linux-2.6.12-rc4-mm1-full/security/keys/key.c.old 2005-05-15 17:09:56.000000000 +0200
+++ linux-2.6.12-rc4-mm1-full/security/keys/key.c 2005-05-15 17:11:11.000000000 +0200
@@ -35,7 +35,7 @@
DECLARE_RWSEM(key_construction_sem);
/* any key who's type gets unegistered will be re-typed to this */
-struct key_type key_type_dead = {
+static struct key_type key_type_dead = {
.name = "dead",
};
@@ -860,6 +860,7 @@
* duplicate a key, potentially with a revised description
* - must be supported by the keytype (keyrings for instance can be duplicated)
*/
+#if 0
struct key *key_duplicate(struct key *source, const char *desc)
{
struct key *key;
@@ -904,6 +905,7 @@
goto out;
} /* end key_duplicate() */
+#endif /* 0 */
/*****************************************************************************/
/*
--- linux-2.6.12-rc4-mm1-full/security/keys/keyring.c.old 2005-05-15 17:12:43.000000000 +0200
+++ linux-2.6.12-rc4-mm1-full/security/keys/keyring.c 2005-05-15 17:12:53.000000000 +0200
@@ -69,7 +69,7 @@
* semaphore to serialise link/link calls to prevent two link calls in parallel
* introducing a cycle
*/
-DECLARE_RWSEM(keyring_serialise_link_sem);
+static DECLARE_RWSEM(keyring_serialise_link_sem);
/*****************************************************************************/
/*
--- linux-2.6.12-rc4-mm1-full/security/seclvl.c.old 2005-05-15 17:13:29.000000000 +0200
+++ linux-2.6.12-rc4-mm1-full/security/seclvl.c 2005-05-15 17:16:21.000000000 +0200
@@ -122,7 +122,7 @@
* kobject stuff
*/
-struct subsystem seclvl_subsys;
+static struct subsystem seclvl_subsys;
struct seclvl_obj {
char *name;
@@ -179,7 +179,7 @@
.sysfs_ops = &seclvlfs_sysfs_ops
};
-decl_subsys(seclvl, &seclvl_ktype, NULL);
+static decl_subsys(seclvl, &seclvl_ktype, NULL);
/**
* The actual security level. Ranges between -1 and 2 inclusive.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] security/: possible cleanups
2005-05-16 18:45 [2.6 patch] security/: possible cleanups Adrian Bunk
@ 2005-05-16 21:08 ` Chris Wright
2005-05-17 14:08 ` David Howells
0 siblings, 1 reply; 6+ messages in thread
From: Chris Wright @ 2005-05-16 21:08 UTC (permalink / raw)
To: Adrian Bunk; +Cc: chrisw, linux-security-module, linux-kernel, dhowells
* Adrian Bunk (bunk@stusta.de) wrote:
> This patch contains the following possible cleanups:
> - make needlessly global code static
> - #if 0 the following unused global function:
> - keys/key.c: key_duplicate
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Ack for seclvl change.
Acked-by: Chris Wright <chrisw@osdl.org>
I see no issue with the keys changes, except I'd rather see key_duplicate
removed entirely if it's not getting used. David, is there a plan to
put it to use, or can Adrian remove it?
thanks,
-chris
> --- linux-2.6.12-rc4-mm1-full/security/keys/internal.h.old 2005-05-15 17:11:19.000000000 +0200
> +++ linux-2.6.12-rc4-mm1-full/security/keys/internal.h 2005-05-15 17:11:23.000000000 +0200
> @@ -25,7 +25,6 @@
> #define kdebug(FMT, a...) do {} while(0)
> #endif
>
> -extern struct key_type key_type_dead;
> extern struct key_type key_type_user;
>
> /*****************************************************************************/
> --- linux-2.6.12-rc4-mm1-full/security/keys/key.c.old 2005-05-15 17:09:56.000000000 +0200
> +++ linux-2.6.12-rc4-mm1-full/security/keys/key.c 2005-05-15 17:11:11.000000000 +0200
> @@ -35,7 +35,7 @@
> DECLARE_RWSEM(key_construction_sem);
>
> /* any key who's type gets unegistered will be re-typed to this */
> -struct key_type key_type_dead = {
> +static struct key_type key_type_dead = {
> .name = "dead",
> };
>
> @@ -860,6 +860,7 @@
> * duplicate a key, potentially with a revised description
> * - must be supported by the keytype (keyrings for instance can be duplicated)
> */
> +#if 0
> struct key *key_duplicate(struct key *source, const char *desc)
> {
> struct key *key;
> @@ -904,6 +905,7 @@
> goto out;
>
> } /* end key_duplicate() */
> +#endif /* 0 */
>
> /*****************************************************************************/
> /*
> --- linux-2.6.12-rc4-mm1-full/security/keys/keyring.c.old 2005-05-15 17:12:43.000000000 +0200
> +++ linux-2.6.12-rc4-mm1-full/security/keys/keyring.c 2005-05-15 17:12:53.000000000 +0200
> @@ -69,7 +69,7 @@
> * semaphore to serialise link/link calls to prevent two link calls in parallel
> * introducing a cycle
> */
> -DECLARE_RWSEM(keyring_serialise_link_sem);
> +static DECLARE_RWSEM(keyring_serialise_link_sem);
>
> /*****************************************************************************/
> /*
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] security/: possible cleanups
2005-05-16 21:08 ` Chris Wright
@ 2005-05-17 14:08 ` David Howells
2005-05-30 19:41 ` Adrian Bunk
0 siblings, 1 reply; 6+ messages in thread
From: David Howells @ 2005-05-17 14:08 UTC (permalink / raw)
To: Chris Wright; +Cc: Adrian Bunk, linux-security-module, linux-kernel
Chris Wright <chrisw@osdl.org> wrote:
> I see no issue with the keys changes, except I'd rather see key_duplicate
> removed entirely if it's not getting used. David, is there a plan to
> put it to use, or can Adrian remove it?
There was a keyctl call for it, I thought. I wonder what happened to it. Let
me think about what I want to do with it. Note that if key_duplicate() gets
removed, then the key_type->duplicate() op may as well be rooted out and shot
too.
The rest of the patch looks vaguely okay.
David
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] security/: possible cleanups
2005-05-17 14:08 ` David Howells
@ 2005-05-30 19:41 ` Adrian Bunk
0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2005-05-30 19:41 UTC (permalink / raw)
To: David Howells; +Cc: Chris Wright, linux-security-module, linux-kernel
On Tue, May 17, 2005 at 03:08:01PM +0100, David Howells wrote:
> Chris Wright <chrisw@osdl.org> wrote:
>
> > I see no issue with the keys changes, except I'd rather see key_duplicate
> > removed entirely if it's not getting used. David, is there a plan to
> > put it to use, or can Adrian remove it?
>
> There was a keyctl call for it, I thought. I wonder what happened to it. Let
> me think about what I want to do with it. Note that if key_duplicate() gets
> removed, then the key_type->duplicate() op may as well be rooted out and shot
> too.
Have you thought about what to do with key_duplicate()?
> The rest of the patch looks vaguely okay.
>
> David
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 6+ messages in thread
* [2.6 patch] security/: possible cleanups
@ 2005-10-31 0:33 Adrian Bunk
0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2005-10-31 0:33 UTC (permalink / raw)
To: chrisw; +Cc: linux-security-module, linux-kernel
This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 the following unused global function:
- keys/key.c: key_duplicate
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
security/keys/internal.h | 1 -
security/keys/key.c | 4 +++-
security/keys/keyring.c | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
--- linux-2.6.12-rc4-mm1-full/security/keys/internal.h.old 2005-05-15 17:11:19.000000000 +0200
+++ linux-2.6.12-rc4-mm1-full/security/keys/internal.h 2005-05-15 17:11:23.000000000 +0200
@@ -25,7 +25,6 @@
#define kdebug(FMT, a...) do {} while(0)
#endif
-extern struct key_type key_type_dead;
extern struct key_type key_type_user;
/*****************************************************************************/
--- linux-2.6.12-rc4-mm1-full/security/keys/key.c.old 2005-05-15 17:09:56.000000000 +0200
+++ linux-2.6.12-rc4-mm1-full/security/keys/key.c 2005-05-15 17:11:11.000000000 +0200
@@ -35,7 +35,7 @@
DECLARE_RWSEM(key_construction_sem);
/* any key who's type gets unegistered will be re-typed to this */
-struct key_type key_type_dead = {
+static struct key_type key_type_dead = {
.name = "dead",
};
@@ -860,6 +860,7 @@
* duplicate a key, potentially with a revised description
* - must be supported by the keytype (keyrings for instance can be duplicated)
*/
+#if 0
struct key *key_duplicate(struct key *source, const char *desc)
{
struct key *key;
@@ -904,6 +905,7 @@
goto out;
} /* end key_duplicate() */
+#endif /* 0 */
/*****************************************************************************/
/*
--- linux-2.6.12-rc4-mm1-full/security/keys/keyring.c.old 2005-05-15 17:12:43.000000000 +0200
+++ linux-2.6.12-rc4-mm1-full/security/keys/keyring.c 2005-05-15 17:12:53.000000000 +0200
@@ -69,7 +69,7 @@
* semaphore to serialise link/link calls to prevent two link calls in parallel
* introducing a cycle
*/
-DECLARE_RWSEM(keyring_serialise_link_sem);
+static DECLARE_RWSEM(keyring_serialise_link_sem);
/*****************************************************************************/
/*
^ permalink raw reply [flat|nested] 6+ messages in thread
* [2.6 patch] security/: possible cleanups
@ 2005-11-07 21:18 Adrian Bunk
0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2005-11-07 21:18 UTC (permalink / raw)
To: Andrew Morton; +Cc: chrisw, linux-security-module, linux-kernel
This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 the following unused global function:
- keys/key.c: key_duplicate
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 31 Oct 2005
security/keys/internal.h | 1 -
security/keys/key.c | 4 +++-
security/keys/keyring.c | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
--- linux-2.6.12-rc4-mm1-full/security/keys/internal.h.old 2005-05-15 17:11:19.000000000 +0200
+++ linux-2.6.12-rc4-mm1-full/security/keys/internal.h 2005-05-15 17:11:23.000000000 +0200
@@ -25,7 +25,6 @@
#define kdebug(FMT, a...) do {} while(0)
#endif
-extern struct key_type key_type_dead;
extern struct key_type key_type_user;
/*****************************************************************************/
--- linux-2.6.12-rc4-mm1-full/security/keys/key.c.old 2005-05-15 17:09:56.000000000 +0200
+++ linux-2.6.12-rc4-mm1-full/security/keys/key.c 2005-05-15 17:11:11.000000000 +0200
@@ -35,7 +35,7 @@
DECLARE_RWSEM(key_construction_sem);
/* any key who's type gets unegistered will be re-typed to this */
-struct key_type key_type_dead = {
+static struct key_type key_type_dead = {
.name = "dead",
};
@@ -860,6 +860,7 @@
* duplicate a key, potentially with a revised description
* - must be supported by the keytype (keyrings for instance can be duplicated)
*/
+#if 0
struct key *key_duplicate(struct key *source, const char *desc)
{
struct key *key;
@@ -904,6 +905,7 @@
goto out;
} /* end key_duplicate() */
+#endif /* 0 */
/*****************************************************************************/
/*
--- linux-2.6.12-rc4-mm1-full/security/keys/keyring.c.old 2005-05-15 17:12:43.000000000 +0200
+++ linux-2.6.12-rc4-mm1-full/security/keys/keyring.c 2005-05-15 17:12:53.000000000 +0200
@@ -69,7 +69,7 @@
* semaphore to serialise link/link calls to prevent two link calls in parallel
* introducing a cycle
*/
-DECLARE_RWSEM(keyring_serialise_link_sem);
+static DECLARE_RWSEM(keyring_serialise_link_sem);
/*****************************************************************************/
/*
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-11-07 21:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-16 18:45 [2.6 patch] security/: possible cleanups Adrian Bunk
2005-05-16 21:08 ` Chris Wright
2005-05-17 14:08 ` David Howells
2005-05-30 19:41 ` Adrian Bunk
-- strict thread matches above, loose matches on Subject: below --
2005-10-31 0:33 Adrian Bunk
2005-11-07 21:18 Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox