← Back to team overview

ecryptfs-devel team mailing list archive

Re: Maybe a bug

 

Pascal Terjan wrote:
> Hi,
> line 236 of fs/ecryptfs/messaging.c looks wrong :
> 
> ====
>         rc = ecryptfs_find_daemon_by_euid(&old_daemon, euid, user_ns);
>         if (rc != 0) {
>                 printk(KERN_WARNING "Received request from user [%d] "
>                        "to register daemon [0x%p]; unregistering daemon
> "
>                        "[0x%p]\n", euid, pid, old_daemon->pid);
>                 rc = ecryptfs_send_raw_message(ECRYPTFS_MSG_QUIT,
> old_daemon);
> ====
> 
> Doesn't rc != 0 mean that it was _not_ found ?

That's correct

>
> changing it to (rc == 0) would make more sense to me

I agree, but that function (ecryptfs_process_helo) shouldn't be there
anymore.  It isn't being called anywhere and should have been removed
when I pulled the netlink transport code (see commit
624ae5284516870657505103ada531c64dba2a9a), but I missed it.  In the
miscdev transport, open() and close() on /dev/ecryptfs has taken the
place of the ECRYPTFS_MSG_HELO and ECRYPTFS_MSG_QUIT messages in the old
netlink transport.

I appreciate you taking a look through the code and providing feedback.

Tyler Hicks

> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~ecryptfs-devel
> Post to     : ecryptfs-devel@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ecryptfs-devel
> More help   : https://help.launchpad.net/ListHelp


Attachment: signature.asc
Description: OpenPGP digital signature


References