Re: [agl-dev-community] [HELP] Port Qt Desktop Widget to run on AGL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 17 Dec 2019 00:11:47 -0800
"Guowei Lv" <guowei@xxxxxxxxxx> wrote:

Hi Guowei,

You are facing a security issue. The process that writes the file
/tmp/disk1.txt has the Smack label System and then creates a file
with that label.

Your application (I guess your app is with the config of taskmanager and
then has the smack label User::App::taskmanager) can not read such file.

To help you, I need to know what you are doing. That is because in such
circumstances, there is generally more than one solution, and some are
better than other.

Best regards
José

> Hi,
> 
> Thanks for your help.
> 
> We have encountered a new problem:
> 
> Our Qt app reads and parses a log file in /tmp, here is the code:
> 
> QFile inputFile("/tmp/disk1.txt");
> if (inputFile.open(QIODevice::ReadOnly))
> {
> // do work
> } else {
> // error reading file
> }
> 
> It seems that the Qt app (which is modified from taskmanager app) do
> not have permission to read files:
> 
> Dec 17 07:53:23 qemux86-64 audit[682]: AVC lsm=SMACK
> fn=smack_inode_permission action=denied
> subject=" " object="System" requested=r pid=682
> comm="taskmanager" name="disk1.txt" dev="tmpfs" ino=24766 Dec 17
> 07:53:23 qemux86-64 audit[682]: SYSCALL arch=c000003e syscall=257
> success=no exit=-13 a0=ffffff9c a1=55c8ffabfc28 a2=80000 a3=0 items=0
> ppid=681 pid=682 auid=4294967295 uid=1001 gid=1001 euid=1001
> suid=1001 fsuid=1001 egid=1001 sgid=1001 fsgid=1001 tty=(none)
> ses=4294967295 comm="taskmanager"
> exe="/var/local/lib/afm/applications/taskmanager/0.1/bin/taskmanager"
> subj=User::App::taskmanager key=(null)
> 
> Anybody knows how can I make this work?
> 
> Thanks.
> 
> Best Regards
> Guowei
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#7911): https://lists.automotivelinux.org/g/agl-dev-community/message/7911
Mute This Topic: https://lists.automotivelinux.org/mt/66430094/2167316
Group Owner: agl-dev-community+owner@xxxxxxxxxxxxxxxxxxxxxxxxx
Unsubscribe: https://lists.automotivelinux.org/g/agl-dev-community/leave/4543822/883735764/xyzzy  [list-automotive-discussions82@xxxxxxxxxxx]
-=-=-=-=-=-=-=-=-=-=-=-





[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux