aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archival/rpm.c2
-rw-r--r--util-linux/mdev.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/archival/rpm.c b/archival/rpm.c
index 9d16567bc..32d506de0 100644
--- a/archival/rpm.c
+++ b/archival/rpm.c
@@ -143,7 +143,7 @@ int rpm_main(int argc, char **argv)
143 mytags = rpm_gettags(rpm_fd, (int *) &tagcount); 143 mytags = rpm_gettags(rpm_fd, (int *) &tagcount);
144 offset = lseek(rpm_fd, 0, SEEK_CUR); 144 offset = lseek(rpm_fd, 0, SEEK_CUR);
145 if (!mytags) { printf("Error reading rpm header\n"); exit(-1); } 145 if (!mytags) { printf("Error reading rpm header\n"); exit(-1); }
146 map = mmap(0, offset > getpagesize() ? (offset + offset % getpagesize()) : getpagesize(), PROT_READ, MAP_SHARED, rpm_fd, 0); // Mimimum is one page 146 map = mmap(0, offset > getpagesize() ? (offset + offset % getpagesize()) : getpagesize(), PROT_READ, MAP_PRIVATE, rpm_fd, 0); // Mimimum is one page
147 if (func & rpm_install) { 147 if (func & rpm_install) {
148 loop_through_files(RPMTAG_BASENAMES, fileaction_dobackup); /* Backup any config files */ 148 loop_through_files(RPMTAG_BASENAMES, fileaction_dobackup); /* Backup any config files */
149 extract_cpio_gz(rpm_fd); // Extact the archive 149 extract_cpio_gz(rpm_fd); // Extact the archive
diff --git a/util-linux/mdev.c b/util-linux/mdev.c
index 830939b92..d414c0c10 100644
--- a/util-linux/mdev.c
+++ b/util-linux/mdev.c
@@ -68,7 +68,7 @@ static void make_device(char *path)
68 /* mmap the config file */ 68 /* mmap the config file */
69 if (-1!=(fd=open("/etc/mdev.conf",O_RDONLY))) { 69 if (-1!=(fd=open("/etc/mdev.conf",O_RDONLY))) {
70 len=lseek(fd,0,SEEK_END); 70 len=lseek(fd,0,SEEK_END);
71 conf=mmap(NULL,len,PROT_READ,MAP_SHARED,fd,0); 71 conf=mmap(NULL,len,PROT_READ,MAP_PRIVATE,fd,0);
72 if (conf) { 72 if (conf) {
73 int line=0; 73 int line=0;
74 74