It should make file readonly. Current implementation uses

newmode = newmode ^ (S_IWRITE|S_IWGRP|S_IWOTH);

I think that it should be

newmode = newmode & (~(S_IWRITE|S_IWGRP|S_IWOTH));

unless I'm mistaken in understanding chmod functionality.

Artur

Reply via email to