Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37511436
en ru br
Репозитории ALT
S:1.11.23-alt9
5.1: 1.11.23-alt3.M50P.1
4.1: 1.11.22-alt3
4.0: 1.11.22-alt2
+updates:1.11.22-alt2
3.0: 1.11.20-alt1
www.altlinux.org/Changes

Группа :: Разработка/Прочее
Пакет: cvs

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: cvs-1.11.20-alt-password_entry_operation.patch
Скачать


diff -upk.orig cvs-1.11.20.orig/src/login.c cvs-1.11.20/src/login.c
--- cvs-1.11.20.orig/src/login.c	2005-09-29 13:31:29 +0000
+++ cvs-1.11.20/src/login.c	2005-09-29 13:31:46 +0000
@@ -323,10 +323,14 @@ internal error: can only call password_e
     fp = CVS_FOPEN (passfile, "r");
     if (fp == NULL)
     {
+	if (operation != password_entry_add || ENOENT != errno)
 	error (0, errno, "warning: failed to open %s for reading", passfile);
 	goto process;
     }
 
+    /* Utter, total, raving paranoia, I know. */
+    fchmod (fileno (fp), 0600);
+
     /* Check each line to see if we have this entry already. */
     line = 0;
     while ((line_length = getline (&linebuf, &linebuf_len, fp)) >= 0)
@@ -348,9 +352,6 @@ internal error: can only call password_e
 	error (0, errno, "cannot close %s", passfile);
     fp = NULL;
 
-    /* Utter, total, raving paranoia, I know. */
-    chmod (passfile, 0600);
-
     /* a copy to return or keep around so we can reuse linebuf */
     if (password != NULL)
     {
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin