Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.2:Test
dos2unix
dos2unix-3.1-preserve-file-modes.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File dos2unix-3.1-preserve-file-modes.patch of Package dos2unix
--- dos2unix.c. 2003-05-21 08:09:08.000000000 -0700 +++ dos2unix.c 2003-05-21 08:09:56.000000000 -0700 @@ -345,11 +345,14 @@ int ConvertDosToUnixOldFile(char* ipInFN char TempPath[16]; struct stat StatBuf; struct utimbuf UTimeBuf; + mode_t mode = S_IRUSR | S_IWUSR; int fd; /* retrieve ipInFN file date stamp */ - if ((ipFlag->KeepDate) && stat(ipInFN, &StatBuf)) + if (stat(ipInFN, &StatBuf)) RetVal = -1; + else + mode = StatBuf.st_mode; strcpy (TempPath, "./u2dtmpXXXXXX"); if((fd=mkstemp (TempPath))<0) { @@ -357,6 +360,9 @@ int ConvertDosToUnixOldFile(char* ipInFN RetVal = -1; } + if (!RetVal && fchmod (fd, mode) && fchmod (fd, S_IRUSR | S_IWUSR)) + RetVal = -1; + #ifdef DEBUG fprintf(stderr, "dos2unix: using %s as temp file\n", TempPath); #endif DEBUG
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor