* cygcheck.cc (pretty_id): Don't exec if `id' program is not found.
This commit is contained in:
parent
5320b93f4e
commit
fa10472e4a
|
@ -1,3 +1,7 @@
|
||||||
|
2003-10-17 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* cygcheck.cc (pretty_id): Don't exec if `id' program is not found.
|
||||||
|
|
||||||
2003-09-20 Christopher Faylor <cgf@redhat.com>
|
2003-09-20 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* kill.cc (main): Allow negative pids (indicates process groups).
|
* kill.cc (main): Allow negative pids (indicates process groups).
|
||||||
|
|
|
@ -77,10 +77,10 @@ PROGS:= cygcheck.exe cygpath.exe getfacl.exe kill.exe mkgroup.exe \
|
||||||
ssp.exe strace.exe umount.exe
|
ssp.exe strace.exe umount.exe
|
||||||
|
|
||||||
CLEAN_PROGS:=$(PROGS)
|
CLEAN_PROGS:=$(PROGS)
|
||||||
ifdef build_dumper
|
ifndef build_dumper
|
||||||
PROGS+=dumper$(EXEEXT)
|
|
||||||
else
|
|
||||||
PROGS:=warn_dumper $(PROGS)
|
PROGS:=warn_dumper $(PROGS)
|
||||||
|
else
|
||||||
|
PROGS+=dumper$(EXEEXT)
|
||||||
CLEAN_PROGS+=dumper.exe
|
CLEAN_PROGS+=dumper.exe
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -780,10 +780,7 @@ pretty_id (const char *s, char *cygwin, size_t cyglen)
|
||||||
*p = '\\';
|
*p = '\\';
|
||||||
|
|
||||||
if (access (id, X_OK))
|
if (access (id, X_OK))
|
||||||
{
|
fprintf (stderr, "`id' program not found\n");
|
||||||
fprintf (stderr, "`id' program not found\n");
|
|
||||||
exit (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
FILE *f = popen (id, "rt");
|
FILE *f = popen (id, "rt");
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@ details. */
|
||||||
|
|
||||||
#define NOCOMATTRIBUTE
|
#define NOCOMATTRIBUTE
|
||||||
|
|
||||||
|
#define _WIN32_IE 0x0400
|
||||||
|
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -330,7 +332,6 @@ dowin (char option)
|
||||||
char *buf, buf1[MAX_PATH], buf2[MAX_PATH];
|
char *buf, buf1[MAX_PATH], buf2[MAX_PATH];
|
||||||
DWORD len = MAX_PATH;
|
DWORD len = MAX_PATH;
|
||||||
WIN32_FIND_DATA w32_fd;
|
WIN32_FIND_DATA w32_fd;
|
||||||
LPITEMIDLIST id;
|
|
||||||
HINSTANCE k32;
|
HINSTANCE k32;
|
||||||
BOOL (*GetProfilesDirectoryAPtr) (LPSTR, LPDWORD) = 0;
|
BOOL (*GetProfilesDirectoryAPtr) (LPSTR, LPDWORD) = 0;
|
||||||
|
|
||||||
|
@ -338,27 +339,15 @@ dowin (char option)
|
||||||
switch (option)
|
switch (option)
|
||||||
{
|
{
|
||||||
case 'D':
|
case 'D':
|
||||||
SHGetSpecialFolderLocation (NULL, allusers_flag ?
|
if (!SHGetSpecialFolderPath (NULL, buf, allusers_flag ?
|
||||||
CSIDL_COMMON_DESKTOPDIRECTORY : CSIDL_DESKTOPDIRECTORY, &id);
|
CSIDL_COMMON_DESKTOPDIRECTORY : CSIDL_DESKTOPDIRECTORY, FALSE))
|
||||||
SHGetPathFromIDList (id, buf);
|
SHGetSpecialFolderPath (NULL, buf, CSIDL_DESKTOPDIRECTORY, FALSE);
|
||||||
/* This if clause is a Fix for Win95 without any "All Users" */
|
|
||||||
if (strlen (buf) == 0)
|
|
||||||
{
|
|
||||||
SHGetSpecialFolderLocation (NULL, CSIDL_DESKTOPDIRECTORY, &id);
|
|
||||||
SHGetPathFromIDList (id, buf);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'P':
|
case 'P':
|
||||||
SHGetSpecialFolderLocation (NULL, allusers_flag ?
|
if (!SHGetSpecialFolderPath (NULL, buf, allusers_flag ?
|
||||||
CSIDL_COMMON_PROGRAMS : CSIDL_PROGRAMS, &id);
|
CSIDL_COMMON_PROGRAMS : CSIDL_PROGRAMS, FALSE))
|
||||||
SHGetPathFromIDList (id, buf);
|
SHGetSpecialFolderPath (NULL, buf, CSIDL_PROGRAMS, FALSE);
|
||||||
/* This if clause is a Fix for Win95 without any "All Users" */
|
|
||||||
if (strlen (buf) == 0)
|
|
||||||
{
|
|
||||||
SHGetSpecialFolderLocation (NULL, CSIDL_PROGRAMS, &id);
|
|
||||||
SHGetPathFromIDList (id, buf);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'H':
|
case 'H':
|
||||||
|
|
Loading…
Reference in New Issue