Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH]: restore permissions and mode on HISTFILE when renaming it
- X-seq: zsh-workers 22089
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: [PATCH]: restore permissions and mode on HISTFILE when renaming it
- Date: Fri, 16 Dec 2005 15:48:57 +0000
- In-reply-to: <200512160942.30494.arekm@xxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <200512160942.30494.arekm@xxxxxxxxxxxxx>
On Dec 16, 9:42am, Arkadiusz Miskiewicz wrote:
}
} Exaple, I'm working as user arekm and .historyz has arekm:users
} user/group but if I do sudo zsh; ls; exit then it's renamed and I end
} up with .historyz being root:root
Ick. I don't think it's appropriate for root's history to get written
into some other user's SAVEHIST file. A better solution to this would
probably be to skip writing the history entirely if the file owner is
not the same as the current EUID.
} Attached patch makes zsh restore original permissions/owner/group of
} HISTFILE after sucessful rename. It's against HEAD (4.3) cvs version.
Even if that approach is chosen, the race conditions you mentioned
could be avoided by changing the file attributes *before* renaming it.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author