Loading ...
Sorry, an error occurred while loading the content.

[twinklephone] Re: Using Twinkle with skype usb phone

Expand Messages
  • joerg
    ... However you re free to patch yealink.c around line 1000. After ... you insert #user likes to use the phone too ;-) jOERG #define _M222 S_IWUGO #define
    Message 1 of 18 , Aug 1 11:27 AM
    • 0 Attachment
      Am Di 31. Juli 2007 15:42 schrieb joerg:
      > Am Di 31. Juli 2007 10:37 schrieb Andrew Myers:
      > > Not quite sure where this is going, but my USB phone is on /dev/dsp2
      >
      > Sorry for not being verbose enough. Of course i meant a (set of?) yealink
      > device(s). Like maybe
      > /dev/yealink/line1
      >
      > > I can apparently chmod and chown the files in /sys without a problem,
      > > although, since they are created when the driver is installed it would
      > > need to be done every time the files are first accessed.
      >
      > Thats what i meant. There is no way to config the permissions these files
      > are created with.


      However you're free to patch yealink.c around line 1000.
      After
      >/* In order to prevent information leaks, only allow user and group access */
      >#define _M220 S_IWUSR | S_IWGRP
      >#define _M440 S_IRUSR | S_IRGRP
      >#define _M660 _M220 | _M440
      you insert
      #user likes to use the phone too ;-) jOERG
      #define _M222 S_IWUGO
      #define _M444 S_IRUGO
      #define _M666 _M222 | _M444

      and change the corresponding permission settings for the files you need
      >static DEVICE_ATTR(map_seg7 , _M660, show_map , store_map );
      to
      >static DEVICE_ATTR(map_seg7 , _M666, show_map , store_map );

      I consider it better practice to have the phone ctrl device world r/w enabled,
      than to grant complete root rights to a user(-app) thus compromising the
      whole system.

      Probably in this area of code you might as well define the group ("yealnk" or
      sth, instead of root) - i was too lazy to feature out how to do this (at last
      i can't test! No phone). Anyway this would be the best quick shot to solve
      this, like suggested in prev msg. What else is the use of group perm anyway!


      After all i would more like it to have a device to access the phone, not
      a /sys-file. I think there's reason why all /sys/* are owner&access root
      only.


      j

      ps:
      to switch off the backlight, a
      #> echo "BACKLIGHT" >/sys..../yealink/hide_icon
      should suffice. See
      #> cat /sys..../get_icons
      for right spelling and available "icons". Anyway if will _stay_ off, i
      think. :(
    Your message has been successfully submitted and would be delivered to recipients shortly.