Commit 46b07118 authored by frajo's avatar frajo

Merge branch 'jb45124' into 'master'

[lipstick] don't save screenshots with privileged group. JB#45124

See merge request !121
parents 4214ea20 00158c21
......@@ -141,6 +141,12 @@ void ScreenshotWriter::run()
const quint64 status = m_image.save(m_path)
? ScreenshotResult::Finished
: ScreenshotResult::Error;
const QByteArray path = m_path.toUtf8();
int r = chown(path.constData(), getuid(), getgid());
if (r != 0) {
qWarning() << "Screenshot owner/group could not be set" << strerror(errno);
}
ssize_t unused = ::write(m_notifierId, &status, sizeof(status));
Q_UNUSED(unused);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment