Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sailfishos/usb-moded
base: 3142bf0d9099a2424c8cb09f2fc570852b10c967
Choose a base ref
...
head repository: sailfishos/usb-moded
compare: e692ad5ae257ff433a7fa2d2275d35ac6c5aa4de
Choose a head ref
  • 7 commits
  • 13 files changed
  • 1 contributor

Commits on Jan 15, 2020

  1. Add build option to enable sailfish access control

    Add --enable-sailfish-access-control to configure.
    Enable sailfish access control in %build.
    
    Signed-off-by: Tomi Leppänen <tomi.leppanen@jolla.com>
    Tomin1 committed Jan 15, 2020
    Copy the full SHA
    dd99200 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2020

  1. [usb-moded] Add function to check for permission. JB#48441

    Add usbmoded_is_mode_permitted function to check if user is allowed to
    set given mode. Root is always allowed to set any mode. Non-dynamic
    modes are always allowed for all users. Dynamic modes can be set if user
    belongs to sailfish-system.
    
    Signed-off-by: Tomi Leppänen <tomi.leppanen@jolla.com>
    Tomin1 committed Jan 16, 2020
    Copy the full SHA
    12eee44 View commit details
    Browse the repository at this point in the history
  2. [common] Check for restricted modes. JB#48441

    Check for restricted modes in common_get_mode_list and don't return them
    unless allowed. Add uid parameter to common_get_mode_list to do that.
    
    Signed-off-by: Tomi Leppänen <tomi.leppanen@jolla.com>
    Tomin1 committed Jan 16, 2020
    Copy the full SHA
    8517a4c View commit details
    Browse the repository at this point in the history
  3. Add method to retrieve the uid of the sender

    Add method to retrieve the uid of the sender process. This calls DBus
    daemon synchronously.
    
    Signed-off-by: Tomi Leppänen <tomi.leppanen@jolla.com>
    Tomin1 committed Jan 16, 2020
    Copy the full SHA
    b7af2d3 View commit details
    Browse the repository at this point in the history
  4. [control] Limit available modes with last seen user

    Add method to set last seen user. Use that information to limit the
    implicitly set modes. If no user has been seen yet, fallback to
    charging only mode.
    
    Signed-off-by: Tomi Leppänen <tomi.leppanen@jolla.com>
    Tomin1 committed Jan 16, 2020
    Copy the full SHA
    8abafa0 View commit details
    Browse the repository at this point in the history
  5. [dbus] Check sender uid for mode restrictions. Fixes JB#48441

    Check sender uid to deny access for modes that are restricted. Prevent
    non-owner users from hiding or unhiding modes. Add
    get_allowed_modes_for_user method that lists only those methods that
    user may choose.
    
    Set last seen user based on uid that has called
    get_allowed_modes_for_user last. This is not a perfect solution by any
    means since it can be easily confused by calling it from command line as
    root but generally no user other than the active one should call it.
    Later when there is a proper way to get the active user this can be
    improved.
    
    Signed-off-by: Tomi Leppänen <tomi.leppanen@jolla.com>
    Tomin1 committed Jan 16, 2020
    Copy the full SHA
    6e98e56 View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2020

  1. Merge branch 'jb48441' into 'master'

    Limit dynamic modes to device owner
    
    See merge request mer-core/usb-moded!55
    Tomin1 committed Jan 17, 2020
    Copy the full SHA
    e692ad5 View commit details
    Browse the repository at this point in the history