Skip to content

Commit

Permalink
fifos protected !
Browse files Browse the repository at this point in the history
  • Loading branch information
manatlan committed Jun 8, 2024
1 parent eaf5c22 commit e26a58e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions htagweb/fifo.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ def createPipes(self): # for server

if not os.path.exists(self.CLIENT_TO_SERVER_FIFO):
os.mkfifo(self.CLIENT_TO_SERVER_FIFO)
os.chmod(self.CLIENT_TO_SERVER_FIFO, 0o700)
if not os.path.exists(self.SERVER_TO_CLIENT_FIFO):
os.mkfifo(self.SERVER_TO_CLIENT_FIFO)
os.chmod(self.SERVER_TO_CLIENT_FIFO, 0o700)

def removePipes(self): # for server
if os.path.exists(self.CLIENT_TO_SERVER_FIFO):
Expand Down
2 changes: 2 additions & 0 deletions htagweb/hrprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ async def sendactions(actions:dict) -> bool:
try:
if not os.path.exists(f.UPDATE_FIFO):
os.mkfifo(f.UPDATE_FIFO)
os.chmod(f.UPDATE_FIFO, 0o700)


async with aiofiles.open(f.UPDATE_FIFO, mode='w') as fifo_update:
log("sendactions (update):",actions)
Expand Down

0 comments on commit e26a58e

Please sign in to comment.