Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 598 Bytes

ssuconfperm.c

File metadata and controls

25 lines (21 loc) · 598 Bytes
 
Oct 8, 2012
Oct 8, 2012
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/**
* @file ssuconfperm.c
* @copyright 2012 Jolla Ltd.
* @author Bernd Wachter <bernd.wachter@jollamobile.com>
* @date 2012
*
* This is a dirty hack to make sure the main user can write to the
* configuration file; this will be obsolete once we have some
* security framework in place.
*/
#include <sys/stat.h>
#include <unistd.h>
#include "../constants.h"
May 24, 2017
May 24, 2017
17
18
19
int main(int argc, char **argv)
{
struct stat sb;
Oct 8, 2012
Oct 8, 2012
20
May 24, 2017
May 24, 2017
21
22
23
24
if (!stat(SSU_CONFIGURATION, &sb)){
chown(SSU_CONFIGURATION, 0, SSU_GROUP_ID);
chmod(SSU_CONFIGURATION, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH);
}
Oct 8, 2012
Oct 8, 2012
25
}