login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
December
»
24
Re: [RFC][PATCH 6/6] ecryptfs: added support for the encrypted key type
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Mimi Zohar
Subject:
Re: [RFC][PATCH 6/6] ecryptfs: added support for the encrypted key type
Date: Friday, December 24, 2010 - 8:47 am
On Thu, 2010-12-23 at 18:36 +0100, Roberto Sassu wrote:
quoted text
> The function ecryptfs_keyring_auth_tok_for_sig() has been modified in order > to search keys of both 'user' and 'encrypted' types. > > Signed-off-by: Roberto Sassu <roberto.sassu@polito.it> > --- > fs/ecryptfs/ecryptfs_kernel.h | 11 +++++++++-- > fs/ecryptfs/keystore.c | 15 +++++++++++---- > 2 files changed, 20 insertions(+), 6 deletions(-) > > diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h > index a27cad4..068eade 100644 > --- a/fs/ecryptfs/ecryptfs_kernel.h > +++ b/fs/ecryptfs/ecryptfs_kernel.h > @@ -29,6 +29,7 @@ > #define ECRYPTFS_KERNEL_H > > #include <keys/user-type.h> > +#include <keys/encrypted-type.h> > #include <linux/fs.h> > #include <linux/fs_stack.h> > #include <linux/namei.h> > @@ -81,8 +82,14 @@ struct ecryptfs_page_crypt_context { > static inline struct ecryptfs_auth_tok * > ecryptfs_get_key_payload_data(struct key *key) > { > - return (struct ecryptfs_auth_tok *) > - (((struct user_key_payload*)key->payload.data)->data); > +#if defined(CONFIG_ENCRYPTED_KEYS) || defined(CONFIG_ENCRYPTED_KEYS_MODULE) > + if (key->type == &key_type_encrypted) > + return (struct ecryptfs_auth_tok *) > + (&((struct encrypted_key_payload *)key->payload.data)->payload_data); > + else > +#endif > + return (struct ecryptfs_auth_tok *) > + (((struct user_key_payload *)key->payload.data)->data); > }
'ifdefs' belong in include files. How about defining ecryptfs_get_encrypted_key_payload_data() with stub function?
quoted text
> #define ECRYPTFS_SUPER_MAGIC 0xf15f > diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c > index 73811cf..8d72635 100644 > --- a/fs/ecryptfs/keystore.c > +++ b/fs/ecryptfs/keystore.c > @@ -1542,10 +1542,17 @@ int ecryptfs_keyring_auth_tok_for_sig(struct key **auth_tok_key, > > (*auth_tok_key) = request_key(&key_type_user, sig, NULL); > if (!(*auth_tok_key) || IS_ERR(*auth_tok_key)) { > - printk(KERN_ERR "Could not find key with description: [%s]\n", > - sig); > - rc = process_request_key_err(PTR_ERR(*auth_tok_key)); > - goto out; > +#if defined(CONFIG_ENCRYPTED_KEYS) || defined(CONFIG_ENCRYPTED_KEYS_MODULE) > + (*auth_tok_key) = request_key(&key_type_encrypted, sig, NULL); > + if (!(*auth_tok_key) || IS_ERR(*auth_tok_key)) { > +#endif > + printk(KERN_ERR "Could not find key with description: [%s]\n", > + sig); > + rc = process_request_key_err(PTR_ERR(*auth_tok_key)); > + goto out; > +#if defined(CONFIG_ENCRYPTED_KEYS) || defined(CONFIG_ENCRYPTED_KEYS_MODULE) > + } > +#endif
Same here. thanks, Mimi
quoted text
> } > (*auth_tok) = ecryptfs_get_key_payload_data(*auth_tok_key); > if (ecryptfs_verify_version((*auth_tok)->version)) {
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[RFC][PATCH 6/6] ecryptfs: added support for the encrypted ...
, Roberto Sassu
, (Thu Dec 23, 10:36 am)
Re: [RFC][PATCH 6/6] ecryptfs: added support for the encry ...
, Mimi Zohar
, (Fri Dec 24, 8:47 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Paul Turner
[tg_shares_up rewrite v4 11/11] sched: update tg->shares after cpu.shares write
Mr. James W. Laferriere
Re: Linux 2.6.25-rc1 , syntax error near unexpected token `;'
Chuck Ebbert
Re: PCI: Unable to reserve mem region problem
Linus Torvalds
Linux 2.6.34-rc4
Mingming Cao
Re: [RFC 1/4] Large Blocksize support for Ext2/3/4
git
:
Ralf Wildenhues
[PATCH] Fix typos in the documentation
Len Brown
Re: fatal: unable to create '.git/index': File exists
Adeodato
Bazaar's patience diff as GIT_EXTERNAL_DIFF
Denis Bueno
Git clone error
Johannes Schindelin
Re: [PATCH 2/4] Add functions get_relative_cwd() and is_inside_dir()
git-commits-head
:
Linux Kernel Mailing List
ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers
Linux Kernel Mailing List
drivers/acpi: use kasprintf
Linux Kernel Mailing List
nfsd41: sanity check client drc maxreqs
Linux Kernel Mailing List
bnx2x: Moving includes
Linux Kernel Mailing List
V4L/DVB: gspca - sonixj: Adjust minor values of sensor ov7630. - set the color ga...
openbsd-misc
:
Sevan / Venture37
Re: This is what Linus Torvalds calls openBSD crowd
Netmaffia.hu
Tini Lányok AKCIÓBAN OTTHON
Sam Fourman Jr.
Re: Help with Altell PC6700
Siju George
This is what Linus Torvalds calls openBSD crowd
Darrin Chandler
Re: OT: Python (was Re: vi in /bin)
linux-netdev
:
Kurt Van Dijck
Re: [PATCH net-next-2.6 1/2] can: add driver for Softing card
Eric Dumazet
Re: [PATCH net-next-2.6] net: Introduce skb_orphan_try()
Jamie Lokier
Re: POHMELFS high performance network filesystem. Transactions, failover, performa...
Jarek Poplawski
Re: socket api problem: can't bind an ipv6 socket to ::ffff:0.0.0.0
David Miller
Re: [PATCH v2] net: typos in comments in include/linux/igmp.h
Colocation donated by:
Syndicate