Репозитории ALT
S: | 0.2.2-alt11 |
5.1: | 0.2.2-alt2 |
4.1: | 0.2.2-alt1 |
4.0: | 0.2.0-alt6.1 |
3.0: | 0.2.0-alt6 |
Группа :: Система/Ядро и оборудование
Пакет: e2fsimage
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: e2fsimage-0.2.0-passwdfile.patch
Скачать
Скачать
diff -ur e2fsimage-0.2.0.orig/src/main.c e2fsimage-0.2.0/src/main.c
--- e2fsimage-0.2.0.orig/src/main.c 2005-04-05 18:39:20 +0400
+++ e2fsimage-0.2.0/src/main.c 2005-04-08 10:18:29 +0400
@@ -67,7 +67,7 @@
{
int ret = 0, c, create=1, ksize=4096;
char *e2fsfile = NULL;
- char passwd_file[80];
+ char *passwd_file = NULL;
e2i_ctx_t e2c;
struct cnt_t cnt;
uiddb_t passwd;
@@ -82,6 +82,7 @@
e2c.uid_file = ".UIDGID";
e2c.curr_path = NULL;
+ e2c.root_path = NULL;
e2c.cnt = &cnt;
cnt.dir = cnt.regf = cnt.softln = cnt.hardln = cnt.specf = 0;
@@ -114,7 +115,8 @@
}
/* Setup passwd file */
if (e2c.pw_file == NULL) {
- strncpy(passwd_file, e2c.curr_path, 69);
+ passwd_file=malloc(strlen(e2c.curr_path)+12);
+ strcpy(passwd_file,e2c.curr_path);
strcat(passwd_file, "/etc/passwd");
e2c.pw_file = passwd_file;
}