head 1.8; access; symbols pkgsrc-2019Q2:1.7.0.84 pkgsrc-2019Q2-base:1.7 pkgsrc-2019Q1:1.7.0.82 pkgsrc-2019Q1-base:1.7 pkgsrc-2018Q4:1.7.0.80 pkgsrc-2018Q4-base:1.7 pkgsrc-2018Q3:1.7.0.78 pkgsrc-2018Q3-base:1.7 pkgsrc-2018Q2:1.7.0.76 pkgsrc-2018Q2-base:1.7 pkgsrc-2018Q1:1.7.0.74 pkgsrc-2018Q1-base:1.7 pkgsrc-2017Q4:1.7.0.72 pkgsrc-2017Q4-base:1.7 pkgsrc-2017Q3:1.7.0.70 pkgsrc-2017Q3-base:1.7 pkgsrc-2017Q2:1.7.0.66 pkgsrc-2017Q2-base:1.7 pkgsrc-2017Q1:1.7.0.64 pkgsrc-2017Q1-base:1.7 pkgsrc-2016Q4:1.7.0.62 pkgsrc-2016Q4-base:1.7 pkgsrc-2016Q3:1.7.0.60 pkgsrc-2016Q3-base:1.7 pkgsrc-2016Q2:1.7.0.58 pkgsrc-2016Q2-base:1.7 pkgsrc-2016Q1:1.7.0.56 pkgsrc-2016Q1-base:1.7 pkgsrc-2015Q4:1.7.0.54 pkgsrc-2015Q4-base:1.7 pkgsrc-2015Q3:1.7.0.52 pkgsrc-2015Q3-base:1.7 pkgsrc-2015Q2:1.7.0.50 pkgsrc-2015Q2-base:1.7 pkgsrc-2015Q1:1.7.0.48 pkgsrc-2015Q1-base:1.7 pkgsrc-2014Q4:1.7.0.46 pkgsrc-2014Q4-base:1.7 pkgsrc-2014Q3:1.7.0.44 pkgsrc-2014Q3-base:1.7 pkgsrc-2014Q2:1.7.0.42 pkgsrc-2014Q2-base:1.7 pkgsrc-2014Q1:1.7.0.40 pkgsrc-2014Q1-base:1.7 pkgsrc-2013Q4:1.7.0.38 pkgsrc-2013Q4-base:1.7 pkgsrc-2013Q3:1.7.0.36 pkgsrc-2013Q3-base:1.7 pkgsrc-2013Q2:1.7.0.34 pkgsrc-2013Q2-base:1.7 pkgsrc-2013Q1:1.7.0.32 pkgsrc-2013Q1-base:1.7 pkgsrc-2012Q4:1.7.0.30 pkgsrc-2012Q4-base:1.7 pkgsrc-2012Q3:1.7.0.28 pkgsrc-2012Q3-base:1.7 pkgsrc-2012Q2:1.7.0.26 pkgsrc-2012Q2-base:1.7 pkgsrc-2012Q1:1.7.0.24 pkgsrc-2012Q1-base:1.7 pkgsrc-2011Q4:1.7.0.22 pkgsrc-2011Q4-base:1.7 pkgsrc-2011Q3:1.7.0.20 pkgsrc-2011Q3-base:1.7 pkgsrc-2011Q2:1.7.0.18 pkgsrc-2011Q2-base:1.7 pkgsrc-2011Q1:1.7.0.16 pkgsrc-2011Q1-base:1.7 pkgsrc-2010Q4:1.7.0.14 pkgsrc-2010Q4-base:1.7 pkgsrc-2010Q3:1.7.0.12 pkgsrc-2010Q3-base:1.7 pkgsrc-2010Q2:1.7.0.10 pkgsrc-2010Q2-base:1.7 pkgsrc-2010Q1:1.7.0.8 pkgsrc-2010Q1-base:1.7 pkgsrc-2009Q4:1.7.0.6 pkgsrc-2009Q4-base:1.7 pkgsrc-2009Q3:1.7.0.4 pkgsrc-2009Q3-base:1.7 pkgsrc-2009Q2:1.7.0.2 pkgsrc-2009Q2-base:1.7 pkgsrc-2009Q1:1.6.0.2 pkgsrc-2009Q1-base:1.6 pkgsrc-2008Q4:1.3.0.48 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.46 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.44 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.42 pkgsrc-2008Q2-base:1.3 cwrapper:1.3.0.40 pkgsrc-2008Q1:1.3.0.38 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.3.0.36 pkgsrc-2007Q4-base:1.3 pkgsrc-2007Q3:1.3.0.34 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.3.0.32 pkgsrc-2007Q2-base:1.3 pkgsrc-2007Q1:1.3.0.30 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.28 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.26 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.24 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.22 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.20 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.18 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.3.0.16 pkgsrc-2005Q2-base:1.3 pkgsrc-2005Q1:1.3.0.14 pkgsrc-2005Q1-base:1.3 pkgsrc-2004Q4:1.3.0.12 pkgsrc-2004Q4-base:1.3 pkgsrc-2004Q3:1.3.0.10 pkgsrc-2004Q3-base:1.3 pkgsrc-2004Q2:1.3.0.8 pkgsrc-2004Q2-base:1.3 pkgsrc-2004Q1:1.3.0.6 pkgsrc-2004Q1-base:1.3 pkgsrc-2003Q4:1.3.0.4 pkgsrc-2003Q4-base:1.3 netbsd-1-6-1:1.3.0.2 netbsd-1-6-1-base:1.3 netbsd-1-6:1.2.0.8 netbsd-1-6-RELEASE-base:1.2 pkgviews:1.2.0.4 pkgviews-base:1.2 buildlink2:1.2.0.2 buildlink2-base:1.2 netbsd-1-5-PATCH003:1.2 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.8 date 2019.09.04.17.35.45; author nia; state dead; branches; next 1.7; commitid 9gLrtx44RhKGEIBB; 1.7 date 2009.05.17.22.04.11; author dholland; state Exp; branches; next 1.6; 1.6 date 2009.02.04.04.52.46; author dholland; state Exp; branches; next 1.5; 1.5 date 2009.01.26.04.54.50; author dholland; state Exp; branches; next 1.4; 1.4 date 2009.01.25.13.12.44; author obache; state dead; branches; next 1.3; 1.3 date 2002.09.02.16.56.58; author wiz; state Exp; branches; next 1.2; 1.2 date 2002.02.11.00.26.04; author wiz; state Exp; branches; next 1.1; 1.1 date 2002.01.29.12.37.17; author wiz; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2002.01.29.12.37.17; author wiz; state Exp; branches; next ; desc @@ 1.8 log @gentoo: Update to 0.20.7 note: this now uses GTK3. 0.20.7 * Fixed bug that prevented setting the colors for a command button's secondary (right-click) function. Reported by RickTee. * Tiny rewrite to how list entries are stored when reading directories which on my system improved speed by around 30X. Suggested by RickTee. * Updated the GNU gettext machinery. Now requires gettext on your system to support internationalization, instead of including the code in a intl/ subdir in gentoo's code. Makes sense? * Fixed a bug that made gentoo's progress-reporting dialogs lack a parent window, whch in turn made GTK+ emit warnings. @ text @$NetBSD: patch-ae,v 1.7 2009/05/17 22:04:11 dholland Exp $ Fix insecure-temp-files. Replaces older nonworking patch with similar intent. XXX inadequately tested, lack of time. Upstream: sent upstream by obache@@: http://sourceforge.net/tracker/?func=detail&atid=406763&aid=2537314&group_id=32880 --- src/types.c.orig 2008-07-09 15:51:26.000000000 -0400 +++ src/types.c 2009-05-17 17:55:28.000000000 -0400 @@@@ -28,6 +28,12 @@@@ #include #include +#ifdef __sun /* paths.h missing in solaris */ +#define _PATH_TMP "/tmp/" +#else +#include +#endif + #include #include "strutil.h" @@@@ -345,14 +351,18 @@@@ static FType * match_file(GList *list, D void typ_identify_end(MainInfo *min, const gchar *path) { const GList *here; - gchar buf[MAXNAMLEN + 2], *temp_name; + gchar buf[MAXNAMLEN + 2]; gint fd[2], len, status; pid_t file_pid; FType *type; + char tempnamebuf[64]; + int tempfd; if(file_list == NULL) return; - if((temp_name = tmpnam(NULL)) == NULL) + strcpy(tempnamebuf, _PATH_TMP "gentoo.XXXXXX"); + tempfd = mkstemp(tempnamebuf); + if (tempfd < 0) return; if(pipe(fd) != 0) return; @@@@ -360,20 +370,16 @@@@ void typ_identify_end(MainInfo *min, con file_pid = fork(); if(file_pid == 0) { - guint bits = 0U; - - if(close(STDIN_FILENO) == 0) - { - if(dup(fd[STDIN_FILENO]) == STDIN_FILENO) - bits |= (close(fd[STDIN_FILENO]) == 0); - } - if(close(STDOUT_FILENO) == 0) - { - if(open(temp_name, O_CREAT | O_RDWR, S_IRWXU) == STDOUT_FILENO) - bits |= (close(fd[STDOUT_FILENO]) == 0) << 1; - } - if(bits == 3U && chdir(path) == 0) - execlp("file", "file", "-f", "-", NULL); + if (dup2(fd[0], STDIN_FILENO) < 0) + _exit(EXIT_FAILURE); + if (dup2(tempfd, STDOUT_FILENO) < 0) + _exit(EXIT_FAILURE); + close(fd[0]); + close(fd[1]); + close(tempfd); + if (chdir(path) < 0) + _exit(EXIT_FAILURE); + execlp("file", "file", "-f", "-", NULL); _exit(EXIT_FAILURE); } else if(file_pid < 0) @@@@ -382,21 +388,21 @@@@ void typ_identify_end(MainInfo *min, con return; } /* We don't need the input part of the pipe, so close it. */ - close(fd[STDIN_FILENO]); + close(fd[0]); /* Now, we have file listening on pipe, so write all filenames to it. */ for(here = file_list; here != NULL; here = g_list_next(here)) { len = g_snprintf(buf, sizeof buf, "%s\n", DP_SEL_NAME(here)); - write(fd[STDOUT_FILENO], buf, len); + write(fd[1], buf, len); } - close(fd[STDOUT_FILENO]); + close(fd[1]); waitpid(file_pid, &status, 0); if(WIFEXITED(status)) { FILE *in; - if((in = fopen(temp_name, "rt")) != NULL) + if((in = fdopen(tempfd, "rt")) != NULL) { const gchar *fout; gchar line[MAXNAMLEN + 256]; @@@@ -412,10 +418,14 @@@@ void typ_identify_end(MainInfo *min, con } fclose(in); } + else + close(tempfd); } + else + close(tempfd); g_list_free(file_list); file_list = NULL; - remove(temp_name); + remove(tempnamebuf); } /* ----------------------------------------------------------------------------------------- */ @ 1.7 log @Solaris doesn't have . Should fix the last traces of PR 39717. @ text @d1 1 a1 1 $NetBSD: patch-ae,v 1.6 2009/02/04 04:52:46 dholland Exp $ @ 1.6 log @Note upstream tracker url (thanks to obache for filing it!) @ text @d1 1 a1 1 $NetBSD: patch-ae,v 1.5 2009/01/26 04:54:50 dholland Exp $ d9 2 a10 3 +++ src/types.c 2009-01-25 23:36:47.000000000 -0500 @@@@ -27,6 +27,7 @@@@ #include d13 4 d18 2 a19 1 d22 2 a23 1 @@@@ -345,14 +346,18 @@@@ static FType * match_file(GList *list, D d44 1 a44 1 @@@@ -360,20 +365,16 @@@@ void typ_identify_end(MainInfo *min, con d75 1 a75 1 @@@@ -382,21 +381,21 @@@@ void typ_identify_end(MainInfo *min, con d101 1 a101 1 @@@@ -412,10 +411,14 @@@@ void typ_identify_end(MainInfo *min, con @ 1.5 log @Undo the removal of patch-ae in the previous commit, to avoid the insecure-temporary-files problem patch-ae was supposed to fix. Provide a new patch-ae that does something more like the right thing. (The old one tried to open and write to a directory created with mkdtemp(), so even if this code doesn't fully work it's still an improvement.) XXX: compile-tested only, don't have time to do it properly right now... PKGREVISION++. @ text @d1 1 a1 1 $NetBSD$ d6 1 a6 1 Upstream: not sent upstream; inadequately tested, lack of time. @ 1.4 log @Remove patch-ae. It replace tmpnam() with mkdtemp(), but * It exists since initial import, but no reason. * mkdtemp(3) is not portable, but used unconditionally, reported by PR 39717. * tmpnam(3) is used to get temp filename, but mkdtemp(3) create temp directory, and return the path. So, the replacement is completely mistaken. Bump PKGREVISION. While here, marked as DESTDIR ready. @ text @d1 1 a1 1 $NetBSD: patch-ae,v 1.3 2002/09/02 16:56:58 wiz Exp $ d3 26 a28 3 --- src/types.c.orig Sun Aug 25 12:46:47 2002 +++ src/types.c @@@@ -352,7 +352,7 @@@@ void typ_identify_end(MainInfo *min, con d33 3 a35 1 + if((temp_name = mkdtemp(NULL)) == NULL) d39 73 @ 1.3 log @Update to 0.11.33: Excerpt of changes: 0.11.33 * Fixed stupid bug which made some dialogs not respond to being closed. * Reimplemented the SelectToggle command, making it work in linear time as opposed to quadratic as previously. Paid in memory, as usual, but one bit per dir row isn't too much, in my opinion. * Tweaked the Information window slightly, since the two columns had somehow clung too close together. Reported by Felix Rabe. * Added (partial) French translation, thanks to Philippe Rossi. * Removed version number from window title. 0.11.32 * Upgraded to newer versions of GNU gettext, Automake, and Auto- conf, for no apparent reason. * Redid directory history slightly; it used to identify dirs pri- marily by their inode numbers, which failed the filesystem re- uses inodes after e.g. a delete. Reported first by Olle Viksten. * Made ClearSize respect GetSize's selection-preservation flag. * Made the command line help texts (shown by --help) translatable. * Fixed a problem with window name setting that occured when gentoo was running in internationalized mode. * Reworked all code setting window titles; they were affected by similar locale-dependent problems. This feels like a GTK+ problem, but I think GTK+ 1.2.x isn't being developed any longer, so a work- around is probably all we get. * Added a few missing command window titles to gentoo.pot. * Improved layout in ChOwn's window, more label alignment. * Default config will no longer recognize Perl source code if it's not in a file with a ".pl" suffix. This removes use of 'file' in the type checking, which is desirable for performance. * Removed all uses of assert(), especially since all (!) of them depended on side-effects. Did anyone ever build gentoo with de- bugging disabled? That ought to have broken, horribly. Oops. * Hacked a bit on the code that restores the vertical position when a directory is re-entered. Reported by "Michael". * Slightly improved large file support. Still untested by me. * Removed a couple of non-ANSI-isms that must've snuck in when I was looking the other way. Thanks, Josip. * Added support for more modifiers to mouse button command bindings. You need to test which "Mod" is which key, though. Thanks, "Mark". * Cleaned up cmd_generic.c, which is used for many of the standard file commands' dialog boxes. Dialog now done through dialog.c, which means button keyboard accelerators are now supported. * Dialog position now configurable: either follow mouse as always, or center on screen. See Windows config page. Lost the source of the suggestion. @ text @d1 1 a1 1 $NetBSD$ @ 1.2 log @Update to 0.11.19: * Mouse bindings ignore all modifiers except shift, control and alt at all times. Reported by Martin Uddén. * Fixed sloppy pointer-to-int cast that gave warning on 64-bit systems (Alphas). Reported by Jesse Perry. * The Information command can now optionally display the output of 'file' in its window. Suggested by Christian Richter. Do note that this *requires* your 'file' command to support the "-f - -n" option combo. See configure.in for details. * If executing a child process fails, gentoo now sometimes shows an error rather than just dying. This is an improvement. * Added some more -W options to gcc, that scared out some sloppy code that got fixed (even in widgets/). I like killing warnings. * Updated About's copyright for the new year. Time flies. :) * RenameSeq no longer opens its window if there's no selection. * Should now compile on NetBSD, too. Thanks to Pehr Johansson for the original patch. * String input fields (created with '{Is}') can now be set to use asterisks to hide entered text. To do this, add an asterisk in the definition, after the label part, e.g.: '{Is:"Password"*}'. * gentoo now supplies the window manager with a prettier icon, and now also groups its windows, most of the time at least. @ text @d3 1 a3 1 --- src/types.c.orig Wed Jan 30 22:24:40 2002 d5 1 a5 1 @@@@ -354,7 +354,7 @@@@ d12 2 a13 2 if(pipe(fd) == 0) @ 1.1 log @Initial revision @ text @d3 1 a3 1 --- src/types.c.orig Tue Aug 28 18:36:47 2001 d5 1 a5 1 @@@@ -359,7 +359,7 @@@@ @ 1.1.1.1 log @Initial import of gentoo-0.11.18, provided by Pehr Johansson in pkg/15393, with buildlinking and other minor changes by me: gentoo is a modern, powerful, flexible, and utterly configurable file manager for UNIX systems, written using the GTK+ toolkit. It aims to be 100% graphically configurable; there's no need to edit config files by hand and then restart the application. gentoo is somewhat inspired in its look & feel by the classic Amiga program DirectoryOpus. @ text @@