GithubHelp home page GithubHelp logo

Comments (13)

nikias avatar nikias commented on July 18, 2024

The thing is that you need latest usbmuxd that will handle the pair records in /var/lib/lockdown

from libimobiledevice.

greg-dennis avatar greg-dennis commented on July 18, 2024

I do have the latest usbmuxd and it does properly handle the pair records in /var/lib/lockdown. The issue is simply that it was unable to create the /var/lib/lockdown directory to begin with. It attempted to do so here:
https://github.com/libimobiledevice/usbmuxd/blob/master/src/main.c#L542

/var/lib isn't generally world writable, or it at least isn't on a stock Ubuntu install, and so that directory cannot be created at that point.

My suggestion is for sudo make install of either libimobiledevice or usbmuxd to create it and either make it writable by anyone or owned by the usbmux user.

Also, when usbmuxd fails to create the directory, it fails silently, and the idevice commands silently echo no output to the user.

from libimobiledevice.

nikias avatar nikias commented on July 18, 2024

Hm well actually usbmuxd creates the directory before dropping the privileges:

http://cgit.sukimashita.com/usbmuxd.git/tree/src/main.c#n537

And before finally dropping the privileges it changes ownership and permissions:

http://cgit.sukimashita.com/usbmuxd.git/tree/src/main.c#n565

In a normal setup usbmuxd will be executed by udev as root so this should work...

from libimobiledevice.

greg-dennis avatar greg-dennis commented on July 18, 2024

You are right. My bad. Seems I had an error in my build that was causing HAVE_LIBIMOBILEDEVICE to not be set, causing the directory to never be made. Sorry to bother!

from libimobiledevice.

dborca avatar dborca commented on July 18, 2024

I had the same problem as @progressnerd.
It was very frustrating to see everything failing silently.
And now usbmuxd has a semantic dependency to libimobiledevice?

from libimobiledevice.

greg-dennis avatar greg-dennis commented on July 18, 2024

I think there should be a more explicit error message to the user when attempting to use the latest libimobiledevice without updating usbmuxd, or if usbmuxd is built before libimobiledevice is and HAVE_LIBIMOBILEDEVICE is false. I don't know why HAVE_LIBIMOBILEDEVICE is even an compilation option.

from libimobiledevice.

dborca avatar dborca commented on July 18, 2024

"I don't know why HAVE_LIBIMOBILEDEVICE is even an compilation option."

Exactly.

Besides, I find /var/lib a rather curious location for userpref. It holds state information pertaining to an application or the system, not an user. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLIBVARIABLESTATEINFORMATION

from libimobiledevice.

FunkyM avatar FunkyM commented on July 18, 2024

Thanks for you input, but you guys are debating about a feature that is WIP and needs heavy refactoring of all related components. The directory and permissions issue will be resolved and we are very aware of it, too.
The next stable release will work properly and have the needed refactoring in place.

from libimobiledevice.

greg-dennis avatar greg-dennis commented on July 18, 2024

Upon further investigation and reports from other users, I've concluded this should be considered a genuine bug. If the userpref directory already exists, usbmuxd should either explode with an intelligble error or chmod and chown it to the permissions needed by libimobiledevice. Many Linux distros are coming with usbmuxd installed by default, and these default installs are creating the lockdown directory with permissions that make usbmuxd and limd fail. Currently, usbmuxd only calls chmod and chown when it creates the directory itself.

from libimobiledevice.

FunkyM avatar FunkyM commented on July 18, 2024

You must be aware of the fact that limd will no longer manage pair records nor access the pair record directory, only usbmuxd will. Thus this problem will go away anyways.

from libimobiledevice.

greg-dennis avatar greg-dennis commented on July 18, 2024

Will it necessarily? This directory sometimes pre-exists with root permissions, and since usbmuxd won't change the permissions in that case, I think usbmuxd will be unable to access it after it drops privileges.

from libimobiledevice.

nikias avatar nikias commented on July 18, 2024

@progressnerd I changed usbmuxd a while back to create the directory and set proper permissions. Nevertheless @FunkyM is right and the pair record management will move into usbmuxd. I already added the necessary functionality to usbmuxd and adapted the libusbmuxd interface (usbmuxd_read_buid, usbmuxd_read_pair_record, usbmuxd_save_pair_record, and usbmuxd_delete_pair_record) but libimobiledevice integration is still missing.
Closing.

from libimobiledevice.

greg-dennis avatar greg-dennis commented on July 18, 2024

Thank you! I see it was fixed on 12/10/13 by commit libimobiledevice/usbmuxd@ed73edd, only 6 days after I reopened this bug. Now that's service! :)

from libimobiledevice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.