You are not logged in.
A tiny, tiny, patch.
I woke up last night at 2 AM wondering what would happen if you were to, say, include /etc/pacman.conf in /etc/pacman.conf.
Now I know. Nothing
diff -Naur orig/pacman-2.8.3/src/pacman.c pacman-2.8.3/src/pacman.c
--- orig/pacman-2.8.3/src/pacman.c 2004-08-04 00:57:17.000000000 -0500
+++ pacman-2.8.3/src/pacman.c 2004-08-08 17:08:00.000000000 -0500
@@ -101,6 +101,8 @@
PMList *pm_packages = NULL;
/* list of targets specified on command line */
PMList *pm_targets = NULL;
+/* list of parsed config files */
+PMList *pm_parsed = NULL;
FILE *logfd = NULL;
char *lckfile = "/tmp/pacman.lck";
@@ -3344,6 +3346,19 @@
char section[256] = "";
sync_t *sync = NULL;
+ /* catch recursive include directives and error out */
+
+ if (pm_parsed == NULL) {
+ pm_parsed = list_new();
+ }
+
+ if (is_in(configfile,pm_parsed)) {
+ fprintf(stderr, "config: already parsed config file: %sn",configfile);
+ return(1);
+ }
+
+ list_add(pm_parsed, strdup(configfile));
+
if((fp = fopen(configfile, "r")) == NULL) {
perror(configfile);
return(1);
@@ -3802,6 +3817,7 @@
FREE(pmo_xfercommand);
FREELIST(pm_targets);
+ FREELIST(pm_parsed);
/* this is segfaulting... quick fix for now
FREELISTPKGS(pm_packages);*/
Offline
I woke up last night at 2 AM wondering what would happen if you were to, say, include /etc/pacman.conf in /etc/pacman.conf.
Maybe you're a tiny, tiny bit addicted to ArchLinux if you wake up like that at 2am?
Offline
tehdely wrote:I woke up last night at 2 AM wondering what would happen if you were to, say, include /etc/pacman.conf in /etc/pacman.conf.
Maybe you're a tiny, tiny bit addicted to ArchLinux if you wake up like that at 2am?
Well to tell the truth, I was woken up by somebody asking me that. Causing me to wonder myself
And he's a Gentoo user
Offline
Well to tell the truth, I was woken up by somebody asking me that. Causing me to wonder myself
Ahh. Well, that's a bit better.
Offline