Skip to content

Commit

Permalink
[2.7-beta2-analysisd] change mode to 0660, owner to ossec:ossec for F…
Browse files Browse the repository at this point in the history
…TS_QUEUE/IG_QUEUE
  • Loading branch information
jbcheng committed Oct 31, 2012
1 parent 353f395 commit 81bdd82
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/LOCATION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DIR="/var/ossec27-beta3"
DIR="/var/ossec"
CC=gcc
GCC=gcc
CLANG=clang
16 changes: 14 additions & 2 deletions src/analysisd/fts.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@ int FTS_Init()
if(fp_list)
fclose(fp_list);

chmod(FTS_QUEUE, 0777);
chmod(FTS_QUEUE, 0640);

int uid = Privsep_GetUser(USER);
int gid = Privsep_GetGroup(GROUPGLOBAL);
if(uid>=0 && gid>=0)
chown(FTS_QUEUE, uid, gid);

fp_list = fopen(FTS_QUEUE, "r+");
if(!fp_list)
{
Expand Down Expand Up @@ -130,7 +136,13 @@ int FTS_Init()
if(fp_ignore)
fclose(fp_ignore);

chmod(IG_QUEUE, 0777);
chmod(IG_QUEUE, 0640);

int uid = Privsep_GetUser(USER);
int gid = Privsep_GetGroup(GROUPGLOBAL);
if(uid>=0 && gid>=0)
chown(IG_QUEUE, uid, gid);

fp_ignore = fopen(IG_QUEUE, "r+");
if(!fp_ignore)
{
Expand Down

0 comments on commit 81bdd82

Please sign in to comment.