[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wierd monit/sshd interaction
From: |
Jan-Henrik Haukeland |
Subject: |
Re: Wierd monit/sshd interaction |
Date: |
06 Aug 2002 01:56:27 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service) |
Did this really solve the problem with sshd on debian?
Mark Ferlatte <address@hidden> writes:
> --- files.c.orig Fri Jun 28 14:20:49 2002
> +++ files.c Mon Aug 5 11:44:16 2002
> @@ -161,8 +161,9 @@
> int create_pidfile(char *pidfile) {
>
> FILE *F= NULL;
> + mode_t saved;
>
> - umask(PIDMASK);
> + saved = umask(PIDMASK);
>
> if ((F= fopen(pidfile,"w")) == (FILE *)NULL) {
>
> @@ -173,9 +174,9 @@
>
> }
>
> - fprintf(F, "%d", (int)getpid());
> + fprintf(F, "%d\n", (int)getpid());
> fclose(F);
> -
> + umask(saved);
> return TRUE;
>
> }
>
--
Jan-Henrik Haukeland