platform/core/system/sessiond.git
2 weeks agobenchmark debug sandbox/mbloch/wip-05-28
Michal Bloch [Wed, 28 May 2025 19:59:34 +0000 (21:59 +0200)]
benchmark debug

Change-Id: I42c1866ef96f513e579bb2ac78b12feb67603f92
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
2 weeks agoExtra high timeout for tests
Michal Bloch [Thu, 8 May 2025 17:51:57 +0000 (19:51 +0200)]
Extra high timeout for tests

Change-Id: I6bfdd1d94c7190d2069902a534bd72e9f86ad284
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
2 weeks agoAdd a basic benchmark for subsession_add_fixed_size 25/324925/1
Michal Bloch [Wed, 28 May 2025 19:49:36 +0000 (21:49 +0200)]
Add a basic benchmark for subsession_add_fixed_size

Change-Id: Ib411a2ce77f27f9859476cc136fa3ec65bb0a7bf

2 weeks agoDisallow API calls for template subsessions 24/324924/1
Michal Bloch [Wed, 28 May 2025 18:35:32 +0000 (20:35 +0200)]
Disallow API calls for template subsessions

Change-Id: I959d06a2d7a84bbaf22a95e5d3d7f9ef8ac832b4

2 weeks agoFix integration tests perms checks 21/324921/1
Michal Bloch [Wed, 28 May 2025 14:25:33 +0000 (16:25 +0200)]
Fix integration tests perms checks

 * a symlink's permissions don't matter, so as long as it points to
   the correct file it's supposed to be correct.

 * nominally, symlink permissions are always 0777 and cannot be
   changed, so in theory there is nothing to check. On VD targets
   there exist 0755 symlinks. We don't know where they come from
   or what their meaning is, although it seems harmless and we
   can't do anything about them anyway (there is no lchmod(2)).

 * also update a comment with our recent advances in understanding.

Change-Id: Icb58e3dc541813ce7070943434178ebdcdc73477

2 weeks agoMake regular dir subsessiond from a template. 80/324680/2
Michal Bloch [Thu, 22 May 2025 21:31:30 +0000 (23:31 +0200)]
Make regular dir subsessiond from a template.

Change-Id: I57d4ced4f6aa3c76abc3346b24250ae95fac8753
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
2 weeks agoCreate fixed-size subsessions via template copy 52/322852/4
Michal Bloch [Thu, 22 May 2025 18:07:51 +0000 (20:07 +0200)]
Create fixed-size subsessions via template copy

Regular dirs added in the next commit.

Change-Id: I2b859f71174c690fa2c1658f2986fad60dd803e9

2 weeks agoAdd OS::do_resize2fs 54/324254/9
Karol Lewandowski [Tue, 13 May 2025 14:09:19 +0000 (16:09 +0200)]
Add OS::do_resize2fs

And the corresponding OS::have_resize2fs

Change-Id: I7558a4e2f866a3b3990124cebf803f44ee3663df

2 weeks agoCreate templates at sessiond start 79/324679/3
Michal Bloch [Thu, 22 May 2025 15:16:17 +0000 (17:16 +0200)]
Create templates at sessiond start

Will be used for a fast route to add subsessions,
since renaming a dir/image is much faster than
copying the whole skel folder hierarchy.

Change-Id: I0ff51c4126f44675445d3337a5ab51463c0aec03

3 weeks agoMount image sessions immediately. 70/324670/2
Michal Bloch [Thu, 22 May 2025 12:18:27 +0000 (14:18 +0200)]
Mount image sessions immediately.

Change-Id: Id86481e508ef8659b51be3595f4954d07b891f0d

3 weeks agoRemove the 'unmount at switch' optional feature 69/324669/2
Michal Bloch [Thu, 22 May 2025 11:38:32 +0000 (13:38 +0200)]
Remove the 'unmount at switch' optional feature

Keeping sessions mounted is mandatory for sessiond
to work correctly, the macro was dangerous.

Change-Id: Ib0c0466848f88909eaa0f5e837356d39cfca83cd

3 weeks agoRemount image-based subsessions at boot 68/324668/2
Michal Bloch [Thu, 22 May 2025 11:24:04 +0000 (13:24 +0200)]
Remount image-based subsessions at boot

Change-Id: Iffe5bbe3affb2945ef6c24173eee2daddf0c5110

3 weeks agoExtract uid/username getting from sessiond restoration 67/324667/2
Michal Bloch [Thu, 22 May 2025 11:07:15 +0000 (13:07 +0200)]
Extract uid/username getting from sessiond restoration

Will be used for image remounting as well.

Change-Id: I78a740a9089ba280344aa2dab4ab196234c19607

3 weeks agoMerge changes into tizen
Karol Lewandowski [Thu, 22 May 2025 13:47:48 +0000 (13:47 +0000)]
Merge changes  into tizen

3 weeks agoMerge changes into tizen
Karol Lewandowski [Thu, 22 May 2025 13:47:48 +0000 (13:47 +0000)]
Merge changes  into tizen

3 weeks agoMerge changes from topic "sessiond-optimize-add" into tizen
Karol Lewandowski [Thu, 22 May 2025 13:47:48 +0000 (13:47 +0000)]
Merge changes from topic "sessiond-optimize-add" into tizen

* changes:
  Fixed-size dir: reuse dirs via rename where possible
  Add some extra logs.

3 weeks agoMerge "Allow force-replacement when creating a subsession" into tizen
Karol Lewandowski [Thu, 22 May 2025 13:47:48 +0000 (13:47 +0000)]
Merge "Allow force-replacement when creating a subsession" into tizen

3 weeks agoFixed-size dir: reuse dirs via rename where possible 59/324259/2
Karol Lewandowski [Wed, 14 May 2025 14:06:58 +0000 (16:06 +0200)]
Fixed-size dir: reuse dirs via rename where possible

Change-Id: I181244f0cc16efcd1a22a1b35b8c0b13e2f6a609

3 weeks agoAdd some extra logs. 96/324496/2
Michal Bloch [Mon, 19 May 2025 15:07:17 +0000 (17:07 +0200)]
Add some extra logs.

Change-Id: Id34eb705667edd27fcbcd5c08c9bce1532d8a8a1

3 weeks agoExtract main subsessions dir creation 55/324255/4
Karol Lewandowski [Wed, 14 May 2025 09:14:51 +0000 (11:14 +0200)]
Extract main subsessions dir creation

Any exception handling for the "inner" handler will now
be able to assume that the main subdir exists.

This will come in handy in one of the next patches.

Change-Id: I80540e7e8e0b6ef1ea1df15d0eb7d79f387bf423

3 weeks agoAllow force-replacement when creating a subsession 56/324256/4
Karol Lewandowski [Wed, 14 May 2025 10:23:15 +0000 (12:23 +0200)]
Allow force-replacement when creating a subsession

Overrides any existent data. This will not be used for
regular subsession creation, but for creating templates
which is to be introduced in a further patch.

Change-Id: I718c4fa644038a1f89417123b875e5e52295662c

3 weeks agoEnsure needed utilities are actually installed 99/324499/2
Karol Lewandowski [Mon, 19 May 2025 20:53:35 +0000 (22:53 +0200)]
Ensure needed utilities are actually installed

Change-Id: Ie3d13d983fafa3f0cf3a8bbe48b0257e252b4bac

3 weeks agoRelease 0.10.1.1: add debug logs to execl calls 39/324339/3
Michal Bloch [Thu, 15 May 2025 11:29:50 +0000 (13:29 +0200)]
Release 0.10.1.1: add debug logs to execl calls

Change-Id: Id71e6487fe0f9e14dced82f597ad63e3f175a648

4 weeks agoUnmounting session done via ifdef instead of getenv 81/324081/1
Michal Bloch [Mon, 12 May 2025 09:03:32 +0000 (11:03 +0200)]
Unmounting session done via ifdef instead of getenv

Change-Id: Ic1424b7b8ba782801d3924367355205a4e0183c4

5 weeks agoAvoid string copy in get_current_subsession 80/324080/1
Michal Bloch [Fri, 9 May 2025 16:37:44 +0000 (18:37 +0200)]
Avoid string copy in get_current_subsession

Change-Id: Ief02671502873fa1785f212a5397e3a7a3653fd8
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
5 weeks agoFix some comments. 79/324079/1
Michal Bloch [Fri, 9 May 2025 16:30:06 +0000 (18:30 +0200)]
Fix some comments.

Change-Id: Id1139f2484a6d5aed991e6d2425d4f32cd6d771d

5 weeks agoExtract `do_touch` and make it more like touch(1) 78/324078/1
Michal Bloch [Fri, 9 May 2025 14:34:42 +0000 (16:34 +0200)]
Extract `do_touch` and make it more like touch(1)

Compared to previous:
 * flags +NOCTTY +NONBLOCK -TRUNC
 * permissions -x

Change-Id: I5929338e4795f7723b675474d6a7f09fd2fbd4b4

5 weeks agoMove coreutils-like functions to OS namespace 77/324077/1
Michal Bloch [Fri, 9 May 2025 13:16:45 +0000 (15:16 +0200)]
Move coreutils-like functions to OS namespace

Change-Id: Iabcd0491e114f5c19b55dca2b818858d49aad943

5 weeks agoFix strncpy() missing null character coverity issue 33/323933/1 accepted/tizen/unified/20250512.133259 accepted/tizen/unified/x/20250513.034802
Yunhee Seo [Fri, 9 May 2025 01:31:01 +0000 (10:31 +0900)]
Fix strncpy() missing null character coverity issue

If the strncpy gets the exact length of destination,
null character can be missed.
To fix up this, null character setting explicitly is added.

Change-Id: I8537e53df5e82e63a46898363003d9734bcd731f
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
5 weeks agoRelease 0.10.1.0 16/323816/1 sandbox/klewandowski/ext4fix
Karol Lewandowski [Wed, 7 May 2025 19:21:30 +0000 (21:21 +0200)]
Release 0.10.1.0

Change-Id: Iecfdfb10eab1b682428aed9beee358b63bce0b9e

5 weeks agoCreate space efficient ext4 filesystem without journal 15/323815/1
Karol Lewandowski [Wed, 7 May 2025 20:51:39 +0000 (22:51 +0200)]
Create space efficient ext4 filesystem without journal

Change-Id: I66b824796ed4ac0fa1a982af1e3b57f3e5c02d2a

5 weeks agoIncrease default libsessiond timeout 99/323799/2
Michal Bloch [Wed, 7 May 2025 14:16:02 +0000 (16:16 +0200)]
Increase default libsessiond timeout

Very busy systems running on garbage hardware can sometimes
fail to finish calls within the timeout. The timeout is there
mostly to avoid infinite waiting, so can be as large as we
want to accomodate this as long as it's not infinite/-1.

Change-Id: Id387f627081222edc4a111ac55c4b1a8e67f8576

5 weeks agoservice: session restore: Handle non-existing uids properly 19/323719/3
Karol Lewandowski [Tue, 6 May 2025 17:02:44 +0000 (19:02 +0200)]
service: session restore: Handle non-existing uids properly

/opt/usr/home/ can contain build artifacts like 'abuild' with no
passwd entry, causing sessiond to terminate at user->uid translation.

Fixes:

  I/SESSIOND(18740): main_restore.cpp: restore_all_user_sessions(135) > Restoring last session for user abuild
  E/SESSIOND(18740): main.cpp: main(46) > Exception Couldn't get Unix uid for `abuild` user - does not exist caught in top scope! Bailing out...

Change-Id: Ida7609da7a122b7f10c8ca05bf0d6b5a25e22018

5 weeks agomkfs: Pre-create empty image file to workaround obsolete mkfs.ext4 18/323718/2
Karol Lewandowski [Tue, 6 May 2025 16:58:48 +0000 (18:58 +0200)]
mkfs: Pre-create empty image file to workaround obsolete mkfs.ext4

We not only need to create empty file but also add -F (force) flag
for mkfs.ext4 to actually create filesystem.

Needed for mkfs.ext4 v1.43 from 2013.

Change-Id: I69fb57f2b1d6a8c9823d70a81c0f86f56bd33739

5 weeks agoAvoid mkfs interactive mode extra hard 16/323616/2
Michal Bloch [Wed, 30 Apr 2025 18:37:33 +0000 (20:37 +0200)]
Avoid mkfs interactive mode extra hard

Change-Id: I9b8e12abd0dd1225bc7dc7d32fa31cf7f5588e57

5 weeks agoSwitch to mkfs.ext4 56/323256/3
Karol Lewandowski [Thu, 24 Apr 2025 20:34:11 +0000 (22:34 +0200)]
Switch to mkfs.ext4

It looks like mkfs.ext2 is no longer universally available.

While mkfs.ext4 can still create ext2 filesystems,
mount won't necessarily still support mounting those.

Change-Id: I7a404b9a8feca5a281543f6fad1b50c0566cf574

6 weeks agoAdd subsession current/list getters to plugin API 15/323615/2
Michal Bloch [Wed, 30 Apr 2025 20:14:15 +0000 (22:14 +0200)]
Add subsession current/list getters to plugin API

With some usage in the example/test plugin.

Change-Id: Ieb1826b69fea90d926b7ed85e8c9cb0a2b9cf101

6 weeks agosessiond-plugin-internal.h moved from libsyscommon 22/323522/2
Michal Bloch [Tue, 29 Apr 2025 11:49:56 +0000 (13:49 +0200)]
sessiond-plugin-internal.h moved from libsyscommon

The internal functions are already provided by sessiond,
in plugin_push.cpp, so this makes sure that the header
is also provided in the same place and avoids creating
a "fake" plugin dependency on libsyscommon.

Change-Id: I54754be8612ca71ac6fb7826a828efdecdc43de2

7 weeks agoFix invocation timing of plugin function after completed add/remove/swich 31/323031/1 accepted/tizen/unified/20250429.071346 accepted/tizen/unified/x/20250429.203546
Chanwoo Choi [Tue, 22 Apr 2025 06:50:34 +0000 (15:50 +0900)]
Fix invocation timing of plugin function after completed add/remove/swich

commit b614b440a919 (Add basic event listener plugin support) has the
invocation timing issue of plugin funciton because invocating the plugin
function before add/remove/switch completion.
So that Invocate plugin function after add/remove/switch completion.

Change-Id: Ia7677c0e731829cff5a3c422f6b56d7402ba9936
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
8 weeks agoMerge "Release 0.10.0.3" into tizen
Karol Lewandowski [Mon, 14 Apr 2025 16:14:33 +0000 (16:14 +0000)]
Merge "Release 0.10.0.3" into tizen

8 weeks agoMerge "Advisory locks for restoration" into tizen
Karol Lewandowski [Mon, 14 Apr 2025 16:14:33 +0000 (16:14 +0000)]
Merge "Advisory locks for restoration" into tizen

8 weeks agoMerge "Restore last subsession at sessiond start" into tizen
Karol Lewandowski [Mon, 14 Apr 2025 16:14:33 +0000 (16:14 +0000)]
Merge "Restore last subsession at sessiond start" into tizen

8 weeks agoMerge changes into tizen
Karol Lewandowski [Mon, 14 Apr 2025 16:14:33 +0000 (16:14 +0000)]
Merge changes  into tizen

8 weeks agoMerge changes into tizen
Karol Lewandowski [Mon, 14 Apr 2025 16:14:33 +0000 (16:14 +0000)]
Merge changes  into tizen

8 weeks agoMerge "Add OS::get_uid_from_name" into tizen
Karol Lewandowski [Mon, 14 Apr 2025 16:14:33 +0000 (16:14 +0000)]
Merge "Add OS::get_uid_from_name" into tizen

8 weeks agoRelease 0.10.0.3 03/322703/1
Michal Bloch [Mon, 14 Apr 2025 14:58:08 +0000 (16:58 +0200)]
Release 0.10.0.3

Add subsession restoration after reboot.

Change-Id: Id0213b8768b45153283a28d1594d351f69ca63f2

8 weeks agoAdvisory locks for restoration 26/322626/3
Michal Bloch [Fri, 11 Apr 2025 17:07:33 +0000 (19:07 +0200)]
Advisory locks for restoration

Change-Id: Ic394369fa3ab017503deb329e6dfee0328736f7c

2 months agoRestore last subsession at sessiond start 52/322552/4
Michal Bloch [Thu, 10 Apr 2025 19:55:32 +0000 (21:55 +0200)]
Restore last subsession at sessiond start

And add a restore-only mode in case work needs to be done
such as for fixed-size backend that needs to be remounted.

Change-Id: Iee7d831889ecac7e1a913e7acb61eb9a34ba82a5

2 months agoExtract sysconf buffer allocation 47/322547/3
Michal Bloch [Wed, 9 Apr 2025 16:20:58 +0000 (18:20 +0200)]
Extract sysconf buffer allocation

Change-Id: I931eca869f4b6354c25c5faa0b56362e069839d4

2 months agoAdd OS::get_uid_from_name 48/322548/3
Michal Bloch [Wed, 9 Apr 2025 16:21:43 +0000 (18:21 +0200)]
Add OS::get_uid_from_name

Change-Id: Ic6f5d83857689acfdc94ae88a3c158aff3cdbec8

2 months agoSave the last subsession on disk 50/322550/3
Michal Bloch [Thu, 10 Apr 2025 16:00:10 +0000 (18:00 +0200)]
Save the last subsession on disk

Change-Id: Id25e3ff5ec694aa3071052d4e3130edc9a4c794d

2 months ago`get_main_dir_by_user_id` exposed, returns fs::path 49/322549/3
Michal Bloch [Thu, 10 Apr 2025 15:11:59 +0000 (17:11 +0200)]
`get_main_dir_by_user_id` exposed, returns fs::path

Change-Id: Ic6f5d83857689acfdc94ae88a3c158aff3cdb000

2 months agoExample plugin conforms to libsyscommon interface change 08/322408/1 accepted/tizen/unified/20250412.035603 accepted/tizen/unified/x/20250413.210746
Michal Bloch [Tue, 8 Apr 2025 18:11:52 +0000 (20:11 +0200)]
Example plugin conforms to libsyscommon interface change

Change-Id: I5a5e8cb59dd16c3d287b5ed6584a00e8def63e2e

2 months agoRelease 0.10.0.2 28/322328/2
Michal Bloch [Mon, 7 Apr 2025 14:38:39 +0000 (16:38 +0200)]
Release 0.10.0.2

Hotfix printf arg ordering

Change-Id: Idbec99be804cff38b55537836750fc877f7e2ce3

2 months agoRelease 0.10.0.1 68/321968/2 accepted/tizen/unified/20250404.011642 accepted/tizen/unified/x/20250404.094524
Michal Bloch [Tue, 1 Apr 2025 17:22:17 +0000 (19:22 +0200)]
Release 0.10.0.1

Minor correctness fixes

Change-Id: I25cd31dbd56975e865e1529cb5464493481bd478

2 months agoPlugin example: stump actually fits its contents 67/321967/2
Michal Bloch [Tue, 1 Apr 2025 17:21:52 +0000 (19:21 +0200)]
Plugin example: stump actually fits its contents

Change-Id: I8a112284ef1c17a8501b241435a60bf4796f9699

2 months agoImprove plugin example commentary 66/321966/2
Michal Bloch [Tue, 1 Apr 2025 17:21:05 +0000 (19:21 +0200)]
Improve plugin example commentary

In case it actually gets used as a skeleton/example.

Change-Id: I2861c4fb72d6aaa60fac3f70525faa2816caf09a

2 months agoProper exception handling for add/remove failures 65/321965/2
Michal Bloch [Tue, 1 Apr 2025 15:34:47 +0000 (17:34 +0200)]
Proper exception handling for add/remove failures

Change-Id: I138578dda11a3f21a17c5114e3eb1c1de4fafd16

2 months agoCleanup failed fixed-size add attempts properly 64/321964/2
Michal Bloch [Tue, 1 Apr 2025 12:09:46 +0000 (14:09 +0200)]
Cleanup failed fixed-size add attempts properly

Change-Id: I624fd935c4f1a795503004befc54dd99a15aa06f
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
2 months agoCheck subsession existence explicitly for Add/Remove 51/322051/1
Michal Bloch [Wed, 2 Apr 2025 17:36:04 +0000 (19:36 +0200)]
Check subsession existence explicitly for Add/Remove

Instead of relying on the actual function blowing up
and parsing the exception in the outermost scope.

Change-Id: Ibd9b0f587880dc5503924f0debde1ec17157f892
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
2 months agoTweak exception log messages 63/321963/1
Michal Bloch [Tue, 1 Apr 2025 11:57:29 +0000 (13:57 +0200)]
Tweak exception log messages

 * remove inline \n because this produce 2 separate dlog entries
 * put the specific exception message at the end for readability

Change-Id: I556a0694d691fb324334245613b8b1456ea157cc

2 months agoMerge changes into tizen
Karol Lewandowski [Mon, 31 Mar 2025 16:50:55 +0000 (16:50 +0000)]
Merge changes  into tizen

2 months agoMerge changes from topic "sessiond-2025-03-plugins" into tizen
Karol Lewandowski [Mon, 31 Mar 2025 16:50:55 +0000 (16:50 +0000)]
Merge changes from topic "sessiond-2025-03-plugins" into tizen

* changes:
  Release 0.10.0.0
  Add an example/test plugin
  Plugin can now also push events
  Ensure sessiond service build as PIE
  Add basic event listener plugin support
  Unify validity checks
  Have a single global instance of `sessiond_context`
  Move struct defs out of main.cpp
  Extract work away from dbus method handlers

2 months agoMerge changes into tizen
Karol Lewandowski [Mon, 31 Mar 2025 16:50:55 +0000 (16:50 +0000)]
Merge changes  into tizen

2 months agoMerge changes into tizen
Karol Lewandowski [Mon, 31 Mar 2025 16:50:55 +0000 (16:50 +0000)]
Merge changes  into tizen

2 months agoRelease 0.10.0.0 26/321526/3 accepted/tizen/unified/20250403.081015 accepted/tizen/unified/x/20250403.110103
Michal Bloch [Mon, 24 Mar 2025 17:42:43 +0000 (18:42 +0100)]
Release 0.10.0.0

Added plugin support

Change-Id: Ib297d98a45c454bdc101ce9ad32bd5e40fc7d6ef

2 months agoAdd an example/test plugin 81/321681/4
Karol Lewandowski [Tue, 25 Mar 2025 13:40:22 +0000 (14:40 +0100)]
Add an example/test plugin

Co-authored-by: Michal Bloch <m.bloch@samsung.com>
Change-Id: Ifa7c7d2b773d1840449e855d9885d5c951c1b86d

2 months agoPlugin can now also push events 02/321602/4
Michal Bloch [Tue, 25 Mar 2025 19:55:29 +0000 (20:55 +0100)]
Plugin can now also push events

Change-Id: I920283dd08647ac8abce95de25315484f1e7ba43

2 months agoEnsure sessiond service build as PIE 24/321824/3
Karol Lewandowski [Fri, 28 Mar 2025 13:12:42 +0000 (14:12 +0100)]
Ensure sessiond service build as PIE

This is needed for plugins to be able to safely call sessiond exported
symbols.

Change-Id: I10eb2b8163d202f10cbdd209bffe412309da1952

2 months agoAdd basic event listener plugin support 13/321413/8
Michal Bloch [Wed, 19 Mar 2025 15:54:31 +0000 (16:54 +0100)]
Add basic event listener plugin support

Change-Id: I766a35b341c89d14eeae96f16d31ea65b91ac27e

2 months agoUnify validity checks 54/321754/1
Michal Bloch [Wed, 26 Mar 2025 18:09:14 +0000 (19:09 +0100)]
Unify validity checks

Change-Id: If3ba71927a7d182bde76b25ac655f44f3cf855bb

2 months agoHave a single global instance of `sessiond_context` 80/321680/2
Michal Bloch [Wed, 26 Mar 2025 13:55:54 +0000 (14:55 +0100)]
Have a single global instance of `sessiond_context`

This is the de facto state of affairs
and makes the plugin interface cleaner.

Change-Id: I24cb1625945fae2ef4a7dbb5b4e5e232edb6c911

2 months agoMove struct defs out of main.cpp 01/321601/2
Michal Bloch [Tue, 25 Mar 2025 20:11:10 +0000 (21:11 +0100)]
Move struct defs out of main.cpp

Plugin will want to know the context definition to call work funcs,
so the definitions need to be in a header.

Make some other header functions `inline` to allow multiple inclusion.

Change-Id: Iba0cf4c15f139a47d808ee1fdfaa38e4e64ec4e7

2 months agoExtract work away from dbus method handlers 00/321600/1
Michal Bloch [Tue, 25 Mar 2025 19:08:41 +0000 (20:08 +0100)]
Extract work away from dbus method handlers

Dbus method handlers are now strictly for dealing with dbus messages.
All the work is performed in a separate function, which will be able
to be called directly from non-dbus sources (such as plugin).

Change-Id: I1d2b1fd74827aa65f1fb48205e52d6892b858c11

3 months agoMove fork helpers to OS namespace 46/320946/1
Michal Bloch [Tue, 11 Mar 2025 12:53:06 +0000 (13:53 +0100)]
Move fork helpers to OS namespace

Change-Id: I264f830c8c7e92bdcd29c48b0b57da32aa381d65

3 months agofixed size backend: Do not unmount subsession image when switching away from session 53/320553/2
Karol Lewandowski [Tue, 4 Mar 2025 17:16:14 +0000 (18:16 +0100)]
fixed size backend: Do not unmount subsession image when switching away from session

There is no tangible benefit for unmounting the image.

Change-Id: Ic425cfee68b99fe3eef8f532676f77844229c833

3 months agoSubsession meta file rights tweaks 45/320945/1
Michal Bloch [Thu, 6 Mar 2025 14:25:13 +0000 (15:25 +0100)]
Subsession meta file rights tweaks

 * don't copy SMACK label from the image to the mounted FS root.
   This keeps the label the same as the /etc/skel source.

 * add some commentary.

Change-Id: Iaabb5e0768a93790829574511e592c39de73db60
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
3 months agoRelease 0.7.8.3 31/320731/1 accepted/tizen/unified/20250310.131215 accepted/tizen/unified/x/20250311.125547
Michal Bloch [Thu, 6 Mar 2025 14:27:33 +0000 (15:27 +0100)]
Release 0.7.8.3

Fixes, tests, and proper internal C API.

Change-Id: I467641bd86ce628da8302f25676b7e14d9eb7358
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
3 months agoMake sure self-switch works on fixed-dir backend. 82/320682/1
Michal Bloch [Wed, 5 Mar 2025 18:25:40 +0000 (19:25 +0100)]
Make sure self-switch works on fixed-dir backend.

Change-Id: I93e1f6eeaa9460526da625e0747b6586342ba96b

3 months agoImage files start with a dot 81/320681/1
Michal Bloch [Wed, 5 Mar 2025 18:20:22 +0000 (19:20 +0100)]
Image files start with a dot

Sessions named "foo.img" are valid, only names starting
with a dot are protected for technical reasons.

Change-Id: If0fc31dd124b189d27b71a588eb4ad985699979f

3 months agoAdd advanced fixed-size backend tests. 80/320680/1
Michal Bloch [Tue, 4 Mar 2025 18:55:04 +0000 (19:55 +0100)]
Add advanced fixed-size backend tests.

Covers more scenarios specific to the backend,
and interaction between the two backends.

Change-Id: I2ae980ffa8497dffc455761d1958c94db8390d5d

3 months agoAdd basic fixed-size backend tests. 52/320552/3
Michal Bloch [Tue, 4 Mar 2025 14:27:46 +0000 (15:27 +0100)]
Add basic fixed-size backend tests.

So far just a copy-paste of regular dir backend tests,
doesn't yet handle some fixed-size specific scenarios.

Change-Id: I557d3ebd280547a40feae38da5cbd51c8aeb3bf8

3 months agoFix a typo in test description 79/320679/1
Michal Bloch [Tue, 4 Mar 2025 18:59:31 +0000 (19:59 +0100)]
Fix a typo in test description

Change-Id: Ibfaa4bc253e16524cbde17e99650c6e66ae10667

3 months agoMark existing API tests as using regular-dir backend 51/320551/2
Michal Bloch [Tue, 4 Mar 2025 14:36:14 +0000 (15:36 +0100)]
Mark existing API tests as using regular-dir backend

Change-Id: I59302775c70d9941e1be592aaaa1306a7c36b7c1

3 months agoAdd `subsession_add_user_fixed_size` API. 50/320550/2
Michal Bloch [Tue, 4 Mar 2025 13:08:27 +0000 (14:08 +0100)]
Add `subsession_add_user_fixed_size` API.

Change-Id: Icbf988469a8ec038e4aa5a6a04ddee34304c24b1

3 months agoAccept const references where possible 44/320444/1 accepted/tizen/unified/20250304.070221 accepted/tizen/unified/x/20250304.080631
Michal Bloch [Thu, 27 Feb 2025 19:06:44 +0000 (20:06 +0100)]
Accept const references where possible

Change-Id: I4a2ffbd9352fc04ede70ba34bdd7ca3770b7043f

3 months agoUse `fs` consistently over `std::filesystem` 43/320443/1
Michal Bloch [Thu, 27 Feb 2025 19:03:39 +0000 (20:03 +0100)]
Use `fs` consistently over `std::filesystem`

Change-Id: Id743bce0383e30cc0d5961f22c12c45ad63f2e80

3 months agoRelease 0.7.8.2 34/320334/3 accepted/tizen/unified/20250228.071927 accepted/tizen/unified/x/20250301.185950
Michal Bloch [Wed, 26 Feb 2025 18:56:16 +0000 (19:56 +0100)]
Release 0.7.8.2

Add fixed-size image backend.

Change-Id: I4362242a2f9e0d953f711076fde4e0467f39c8e8

3 months agoFix file permissions for fixed-size backend 85/320385/1
Michal Bloch [Thu, 27 Feb 2025 15:14:24 +0000 (16:14 +0100)]
Fix file permissions for fixed-size backend

Change-Id: I429cb35d2ff50c1c22d9187976c310a774ed90c6

3 months agoCheck for mountpoint before mounting 78/320378/2
Michal Bloch [Thu, 27 Feb 2025 12:20:43 +0000 (13:20 +0100)]
Check for mountpoint before mounting

Change-Id: I335f3d0ae03a473eca929ebf1bd1d34d11c035f7

3 months agoIntegration test: fewer regular subsessions 33/320333/3
Michal Bloch [Wed, 26 Feb 2025 18:55:57 +0000 (19:55 +0100)]
Integration test: fewer regular subsessions

Three is enough, it lets you have an active subsession and multiple
inactive subsessions in parallel (not that we even look at them in
a way that this would matter). More than that doesn't really bring
much value and just makes it take more time to run the test.

Change-Id: Ifa2253bb5f637e74452c452500d711d35c0bc8bc

3 months agoAdd basic integration tests 58/320158/6
Michal Bloch [Mon, 24 Feb 2025 18:00:16 +0000 (19:00 +0100)]
Add basic integration tests

Change-Id: I18075aa397cd07e8dc5318d208b8e8ea008a5ec5
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
3 months agoAdd 'AddUserFixedSize' dbus call. 56/320156/8
Michal Bloch [Wed, 19 Feb 2025 16:19:34 +0000 (17:19 +0100)]
Add 'AddUserFixedSize' dbus call.

Change-Id: I29aa18dcf5812e9a0376f705c39b5483c642c8f4
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
3 months agoAdd fixed-size backend. 55/320155/8
Michal Bloch [Mon, 24 Feb 2025 12:49:41 +0000 (13:49 +0100)]
Add fixed-size backend.

Change-Id: I398db9e586102c97b44724ae52c112b5f2c50638

3 months agoAdd some safety to SessionAdd. 32/320332/2
Michal Bloch [Wed, 26 Feb 2025 17:34:54 +0000 (18:34 +0100)]
Add some safety to SessionAdd.

Change-Id: I2414dba217d3a8f125e13dd8ac78361b2105328d

3 months agoExtract AddSession dir helpers to dir backend. 54/320154/5
Michal Bloch [Fri, 21 Feb 2025 18:42:25 +0000 (19:42 +0100)]
Extract AddSession dir helpers to dir backend.

Change-Id: I0aa9ca022542cb6966911cc45b800110c37b11ff
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
3 months agoAdd a subsession switch callback to dir backend 53/320153/4
Michal Bloch [Mon, 24 Feb 2025 14:15:38 +0000 (15:15 +0100)]
Add a subsession switch callback to dir backend

Change-Id: I83bd27940fe61c6ac6b3a45be9e784db5b4535eb

3 months agoMake dir backends use inheritance instead 78/320078/1
Michal Bloch [Wed, 19 Feb 2025 14:52:11 +0000 (15:52 +0100)]
Make dir backends use inheritance instead

This is because multiple backends will be used at runtime.

Change-Id: I33811b427ba10c91f82927c13aefd61fdbb511f2
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
3 months agoCoverity fixes 26/319626/1 accepted/tizen/unified/20250219.035249 accepted/tizen/unified/x/20250221.042157
Michal Bloch [Thu, 13 Feb 2025 13:50:42 +0000 (14:50 +0100)]
Coverity fixes

Change-Id: I200d8d09571b35888ee543e8c58a3ec822b685db
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 months agoRelease 0.7.8.1 85/319485/3 accepted/tizen/unified/20250214.120456 accepted/tizen/unified/x/20250218.043808
Michal Bloch [Wed, 12 Feb 2025 11:37:26 +0000 (12:37 +0100)]
Release 0.7.8.1

Don't use bleeding edge technologies like C++20
since some known downstream forks use g++9.2.

Change-Id: I020817bb35307c92d7f1a3d13ca529279b33e986
Signed-off-by: Michal Bloch <m.bloch@samsung.com>