Bug #1237
closed
imrest-app is exiting without waiting for any contacts.
Added by Hammel 12 days ago.
Updated 11 days ago.
Description
Pressing the pair icon in launcher runs imrest-app but that app exits nearly immediately and the launcher icon never changes to enabled.\
$ imrest-app -v5
Verbosity level: 5
main[imrest.c:318] INFO No log file configured.
main[imrest.c:328] INFO Running as the app.
pairApp[pair-app.c:104] INFO imrest-app is exiting.
- Description updated (diff)
The imrest-app is just a notifier that tells imrest daemon to enable pair mode.
I need to verify pair.c:pairApp() is called and send the message to the daemon.
I then need to verify imrest is receiving the message in watcher.c:watcherProcessor()
piboxLogger(LOG_INFO, "Toggling pairing state.\n");
It's possible that this block of code needs to be enabled for this to work.
#if 0
/*
* Read message, but ignore it's content (at least for now).
* This is required so select() doesn't think there is more I/O ready.
*/
while ( read(sd, buf, sizeof buf) > 0 )
;
#endif
- Status changed from New to In Progress
- % Done changed from 0 to 10
The problem appears to be that the imrest daemon is run via init as root, but launcher is not root so when it runs imrest-app the latter is run as nobody.
The local socket, /var/run/imrest.sock, used to signal between the app and daemon is root/root 755, which means the user nobody can't write to it.
Appmgr runs imrest-app so it can be privileged via the config. That should fix this problem, I believe.
- Status changed from In Progress to Closed
- % Done changed from 10 to 100
Verified and fixed.
Tested on hardware and it's working.
Code committed and pushed.
Closing issue.
Also available in: Atom
PDF