diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-10-31 00:22:26 +0000 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-10-31 00:22:26 +0000 |
commit | 907199c194af0cb3912219b808aab13df763c022 (patch) | |
tree | 040b0f954a339186b80af486bd1a3c84f15f7477 /src | |
parent | cf9f426f278f57ea74cd22ffda07047c2fb4ce9c (diff) | |
download | librcc-907199c194af0cb3912219b808aab13df763c022.tar.gz librcc-907199c194af0cb3912219b808aab13df763c022.tar.bz2 librcc-907199c194af0cb3912219b808aab13df763c022.tar.xz librcc-907199c194af0cb3912219b808aab13df763c022.zip |
Permission fix
- Fixes .rcc directory permissions ( Bug report by AlexMal )
Diffstat (limited to 'src')
-rw-r--r-- | src/librcc.c | 4 | ||||
-rw-r--r-- | src/rccdb4.c | 2 | ||||
-rw-r--r-- | src/rccxml.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/librcc.c b/src/librcc.c index 98b609e..1ffe00b 100644 --- a/src/librcc.c +++ b/src/librcc.c @@ -333,10 +333,10 @@ int rccInitDb4(rcc_context ctx, const char *name, rcc_db4_flags flags) { if (!dbname) return -1; sprintf(dbname,"%s/.rcc/",rcc_home_dir); - mkdir(dbname, 00644); + mkdir(dbname, 00755); sprintf(dbname,"%s/.rcc/%s.db/",rcc_home_dir,name); - mkdir(dbname, 00644); + mkdir(dbname, 00755); ctx->db4ctx = rccDb4CreateContext(dbname, flags); free(dbname); diff --git a/src/rccdb4.c b/src/rccdb4.c index 9c21477..6a57a5f 100644 --- a/src/rccdb4.c +++ b/src/rccdb4.c @@ -19,7 +19,7 @@ db4_context rccDb4CreateContext(const char *dbpath, rcc_db4_flags flags) { err = db_env_create(&dbe, 0); if (err) return NULL; - err = dbe->open(dbe, dbpath, DB_CREATE|DB_INIT_CDB|DB_INIT_MPOOL, 0); + err = dbe->open(dbe, dbpath, DB_CREATE|DB_INIT_CDB|DB_INIT_MPOOL, 00755); if (err) { dbe->close(dbe, 0); return NULL; diff --git a/src/rccxml.c b/src/rccxml.c index b40d4fc..db13750 100644 --- a/src/rccxml.c +++ b/src/rccxml.c @@ -315,7 +315,7 @@ int rccSave(rcc_context ctx, const char *name) { if (!config) return -1; sprintf(config,"%s/.rcc/",rcc_home_dir); - mkdir(config, 00644); + mkdir(config, 00755); sprintf(config,"%s/.rcc/%s.xml",rcc_home_dir,name); fd = open(config, O_CREAT|O_RDWR,00644); |