Compare commits
316 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0317f94b5 | ||
|
|
9213a0ec8f | ||
|
|
d3c879ee06 | ||
|
|
e20697608b | ||
|
|
62e94b8fcb | ||
|
|
49c5ecdbfb | ||
|
|
ad160404f2 | ||
|
|
f891325268 | ||
|
|
da7125e4bb | ||
|
|
196be3f2a1 | ||
|
|
47417a6e2e | ||
|
|
4737f2d702 | ||
|
|
06dbf9bb28 | ||
|
|
4bac19fd38 | ||
|
|
df438c4170 | ||
| ab6d50b588 | |||
|
|
9c226720cb | ||
|
|
7ef16d92f7 | ||
|
|
ba1905c6c7 | ||
|
|
9e2caeba0d | ||
|
|
5679a7db71 | ||
|
|
b9ed3a9a74 | ||
|
|
39c148ff89 | ||
|
|
04d2b6b0ad | ||
| eeebe2875e | |||
|
|
164a6760ec | ||
|
|
0382798ff4 |
||
|
|
7d135acec2 | ||
|
|
b309d832e2 | ||
|
|
404f522557 | ||
|
|
bf8d5779df | ||
|
|
8e9f6cee44 | ||
|
|
0e7e2e7599 | ||
|
|
ca46de6072 | ||
|
|
67c133a8d4 | ||
|
|
e873a14a1d | ||
|
|
cd951d5e56 |
||
|
|
3e60999497 | ||
| 347d30bca0 | |||
|
|
674f706e83 | ||
|
3abb2f6222 |
|||
|
|
56f4756f3a | ||
|
|
0298d7d2a2 | ||
|
|
d6af9bf445 | ||
| 240d76d679 | |||
|
|
61d2c55ceb | ||
|
|
5a2471d6e5 | ||
|
|
6975c91b71 | ||
|
|
0921016466 | ||
|
|
479766f342 | ||
| c96f6dfba7 | |||
| 480d4cbafa | |||
|
|
abe9339a37 | ||
|
|
8472af8e2c | ||
|
|
e345fc8ab4 | ||
|
|
981295a856 | ||
|
|
bc83b318de | ||
|
|
f0320c8ef7 | ||
|
|
0bd50d406f | ||
|
|
1d94d2966a | ||
|
|
5854ee9f05 | ||
| ceb56aabcb | |||
| b15359d1d4 | |||
| dc6a971801 | |||
| e5d9a1e3ef | |||
| a4d9e81291 | |||
| 1d0d7588dd | |||
|
|
bac574c283 | ||
|
|
c9ce0bbf54 | ||
|
|
8ecb7f1bee | ||
|
|
a16ce36c6f | ||
|
|
302188f833 | ||
|
|
58dc9b6959 | ||
|
|
9a5289e70c | ||
|
|
59309f26f2 | ||
|
|
0b1e1d7cfe | ||
|
|
8760847a17 | ||
|
|
b2320e7499 | ||
|
|
b04999a5a6 | ||
|
|
7961e208cd | ||
|
|
db855d07b8 | ||
|
|
fe2d027119 | ||
|
|
844dcc152c | ||
|
|
c87ed81c2c | ||
|
|
09904cbd56 | ||
|
|
5fa93ec5e0 | ||
|
|
3bf1f5a44f | ||
|
|
4ffd39d553 | ||
|
|
a228e53a4b | ||
|
|
a04c11370c | ||
|
|
d65ce0b32c | ||
|
|
260ccc24c5 | ||
|
|
c96992b25e | ||
|
|
dd1f0e5a82 | ||
|
|
f64c455630 | ||
|
|
1f18765a68 | ||
| 6c5649c0b6 | |||
|
|
6578411a87 | ||
| 3b965f951d | |||
| c409cb5073 | |||
|
|
f3b1a65177 | ||
|
|
5abc3df64a | ||
| f9a78e1def | |||
|
|
f55af7b31a | ||
|
|
93b5e7b623 | ||
|
|
b3ca809df8 | ||
|
|
2abaf6eb96 | ||
|
|
f9f53d46a2 | ||
|
|
31097faf0c | ||
|
|
e7be6ae5f5 | ||
|
|
cca6bc092d | ||
|
|
e86e462be5 | ||
|
|
b50e3f3a07 | ||
|
|
f00635cf14 | ||
| 985b3cb330 | |||
| 05489e2334 | |||
| 2002e7d438 | |||
|
|
8abfa74392 | ||
|
|
1c853c1f4b | ||
|
|
b188598d35 | ||
|
|
08aad7c190 | ||
|
|
5977e189d6 | ||
|
|
347549f079 | ||
|
|
c48435329a | ||
|
|
b441300c92 | ||
|
|
b0e9e3bcb8 | ||
|
|
16f25ffc54 | ||
|
|
5aecaa99fe | ||
|
|
f991f6faa9 | ||
| 98af691bc7 | |||
|
|
ed9b0d3627 | ||
|
|
acc3919c15 | ||
|
|
e998a685f7 | ||
| 098671aa4d | |||
|
|
fe0e3c7437 | ||
|
|
7c81cc769f | ||
|
|
580f0fece0 | ||
|
|
9a75633915 | ||
|
|
f1bf9845c3 | ||
|
|
20ae04497c | ||
|
|
2831759869 | ||
|
|
523a7c4f54 | ||
|
|
086a8aa5c9 | ||
|
|
028de3ee58 | ||
|
|
b3e437baf2 | ||
|
|
7c4fd7f42a | ||
|
|
80deb77249 | ||
|
|
a61dbe7cc6 | ||
|
|
2cde2b2546 | ||
|
|
42ab31a080 | ||
|
|
707076abd5 | ||
|
|
83243ee93c | ||
|
|
4ac61ab4ac | ||
|
|
4820f4132a | ||
|
|
a1ba076eea | ||
|
|
a495296401 | ||
|
|
c0267df5f2 | ||
|
|
7748eaf530 | ||
|
|
351fc04cd1 | ||
|
|
5ecbe52e91 | ||
|
6469bd527b |
|||
|
|
8645c3a8bd | ||
| 11d74871f2 | |||
|
7152f9510d |
|||
|
|
ffe5e68263 | ||
|
|
bdd2c5116b | ||
|
|
a3884eaf3e | ||
|
|
59614e3019 | ||
|
|
bfac7fc8c6 | ||
|
|
052fa90bc6 | ||
|
|
5940ccada5 | ||
|
|
4ada5eaed7 | ||
|
|
437d842852 | ||
|
|
c18880bcb1 | ||
|
|
ba7c336b4c | ||
|
|
c96e764d51 | ||
|
|
3d6431f7c5 | ||
|
|
4c91ee804e | ||
|
|
279eda57a9 | ||
|
|
d3224d47ec | ||
|
|
3d667f8a82 | ||
|
8039d29dfb |
|||
| 530b947e7b | |||
|
|
58bac092a5 | ||
|
|
55938ef1c2 | ||
| 8db7d85a0e | |||
|
|
4420515181 | ||
|
|
3251a896f8 | ||
|
|
95b12b7aa0 | ||
|
|
a56a94947c | ||
|
|
401fd81490 | ||
|
|
8aba0e5c79 | ||
|
|
208b062ff6 | ||
|
|
2cbb58aee9 | ||
|
|
93789c7721 | ||
|
|
558fdf8110 | ||
|
|
8aba564a5f | ||
|
|
d8ee2107f1 | ||
|
|
f898c96467 | ||
|
|
c186315fe8 | ||
|
|
cdab8b4a76 | ||
|
|
17b923cc1e | ||
|
|
77887c051b | ||
|
|
4efad38df3 | ||
|
|
04f1d57f74 | ||
|
|
07ed6e64f8 | ||
|
|
d3eae21d69 | ||
|
|
3d940d4e83 | ||
|
|
b570e8a4eb | ||
|
|
c55c42ae5d | ||
|
|
b106becc25 | ||
|
|
ef494ba0d6 | ||
|
|
e91f50c406 | ||
|
|
de66720388 | ||
|
|
2afb30fac6 | ||
|
|
02e8b22b8e | ||
|
|
77818367d0 | ||
|
|
e466e3cc2f | ||
|
|
c67f1a42d8 | ||
|
|
ae201aa504 | ||
|
|
3f8e6b01a1 | ||
|
|
c3fa85dd81 | ||
|
|
9f10eae074 | ||
|
|
c9e662019e | ||
| 9da9be552a | |||
|
|
6af60835d3 | ||
|
|
1a7e2063fd | ||
|
|
1dd1b6a182 | ||
|
|
298e4e50ad | ||
|
|
185c052093 | ||
|
|
bfcb468173 | ||
|
|
6278f8fb46 | ||
|
|
781e4d0274 | ||
|
|
b92fbbf0f8 | ||
|
|
ee6d69b122 | ||
|
|
fa67a47381 | ||
|
|
c9a44d115f | ||
|
|
05c81d18b2 | ||
|
|
0b35981e89 | ||
|
|
3fe05ecbfc | ||
|
|
eab90e03d7 | ||
|
|
0d11c1c42f | ||
|
|
8b794a5fc5 | ||
|
|
aa5805ac25 | ||
|
|
f6a3ca6784 | ||
|
|
55f81a38e7 | ||
|
|
8e74662110 | ||
|
|
d6ff12d6dc | ||
|
|
34a74aadf6 | ||
|
|
89d447eb6c | ||
|
|
f789f0d9fc | ||
|
|
d4fa6b5537 | ||
|
|
b079edfd15 | ||
| 71fd605ed8 | |||
| 8d539d225f | |||
| 5de818c896 | |||
| ab1e5c59d6 | |||
|
|
361265db38 | ||
|
|
9165bd23fd | ||
|
|
1fc81bb819 | ||
|
|
4be87e9faa | ||
|
|
9016a84fba | ||
|
|
594dffa0d4 | ||
|
|
b06e73cfce | ||
|
|
5c303e7460 | ||
|
|
299715637f | ||
|
|
a8e3fb405f | ||
|
|
ec1e4fccb3 | ||
|
|
f708bc4f81 | ||
|
|
d9d58da0e7 | ||
|
|
90488bdc3b | ||
|
|
aca47746da | ||
|
|
ea09323fa7 | ||
|
|
120f8c1351 | ||
|
|
3c3df501f7 | ||
|
|
636ae6f91d | ||
|
|
f16c031219 | ||
|
|
a6e628e5e7 | ||
|
|
49ff57a01e | ||
|
|
2cfecf3529 | ||
|
|
706e746809 | ||
|
|
d7262717be | ||
|
|
5a1ed95fbe | ||
|
|
2919d71edd | ||
|
|
bf69284dde | ||
|
|
e1b05c26c4 | ||
|
|
85ffd93331 | ||
|
|
067da383fc | ||
|
|
d2b0e417cf | ||
|
|
506ce7948f | ||
|
|
1ae81e57b4 | ||
|
|
19ed00a32f | ||
|
|
59ea5186b7 | ||
|
|
3fc0e67f32 | ||
|
|
379232cd95 | ||
|
|
7bc31e71b7 | ||
|
|
3d430624ce | ||
|
|
4a3cb48228 | ||
|
|
4788cbd6e7 | ||
|
|
27a5499f1e | ||
|
|
2c19cdfe49 | ||
|
|
c2496a27a2 | ||
|
|
cb9405c20e | ||
|
|
2a4e9f041e | ||
|
|
8e3b51d51a | ||
|
|
1bc2448b90 | ||
|
|
0a456518f3 | ||
|
|
dff9e6fd53 | ||
|
|
ead2073dab | ||
|
|
84d2be4ab3 | ||
|
|
7443d56081 | ||
|
|
2adc0e74a6 | ||
|
|
5fd3817ee5 | ||
|
|
49e6ba1400 | ||
|
|
1d0642d057 | ||
|
|
e5224a209a |
40 changed files with 3329 additions and 2866 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
1
|
||||||
85
.gitignore
vendored
85
.gitignore
vendored
|
|
@ -21,3 +21,88 @@
|
||||||
/util-linux-2.22-rc2.tar.xz
|
/util-linux-2.22-rc2.tar.xz
|
||||||
/util-linux-2.22.tar.xz
|
/util-linux-2.22.tar.xz
|
||||||
/util-linux-2.22.1.tar.xz
|
/util-linux-2.22.1.tar.xz
|
||||||
|
/util-linux-2.22.2.tar.xz
|
||||||
|
/util-linux-2.23-rc1.tar.xz
|
||||||
|
/util-linux-2.23-rc2.tar.xz
|
||||||
|
/util-linux-2.23.tar.xz
|
||||||
|
/util-linux-2.23.1.tar.xz
|
||||||
|
/util-linux-2.23.2.tar.xz
|
||||||
|
/util-linux-2.24-rc1.tar.xz
|
||||||
|
/util-linux-2.24.tar.xz
|
||||||
|
/util-linux-2.24.1.tar.xz
|
||||||
|
/util-linux-2.24.2.tar.xz
|
||||||
|
/util-linux-2.25-rc1.tar.xz
|
||||||
|
/util-linux-2.25-rc2.tar.xz
|
||||||
|
/util-linux-2.25.tar.xz
|
||||||
|
/util-linux-2.25.1-rc1.tar.xz
|
||||||
|
/util-linux-2.25.1.tar.xz
|
||||||
|
/util-linux-2.25.2.tar.xz
|
||||||
|
/util-linux-2.26-rc1.tar.xz
|
||||||
|
/util-linux-2.26-rc2.tar.xz
|
||||||
|
/util-linux-2.26.tar.xz
|
||||||
|
/util-linux-2.26.2.tar.xz
|
||||||
|
/util-linux-2.27-rc1.tar.xz
|
||||||
|
/util-linux-2.27-rc2.tar.xz
|
||||||
|
/util-linux-2.27.tar.xz
|
||||||
|
/util-linux-2.27.1.tar.xz
|
||||||
|
/util-linux-2.28-rc1.tar.xz
|
||||||
|
/util-linux-2.28-rc2.tar.xz
|
||||||
|
/util-linux-2.28.tar.xz
|
||||||
|
/util-linux-2.28.1.tar.xz
|
||||||
|
/util-linux-2.28.2.tar.xz
|
||||||
|
/util-linux-2.29-rc1.tar.xz
|
||||||
|
/util-linux-2.29-rc2.tar.xz
|
||||||
|
/util-linux-2.29.tar.xz
|
||||||
|
/util-linux-2.29.1.tar.xz
|
||||||
|
/util-linux-2.29.2.tar.xz
|
||||||
|
/util-linux-2.30-rc1.tar.xz
|
||||||
|
/util-linux-2.30.tar.xz
|
||||||
|
/util-linux-2.30.1.tar.xz
|
||||||
|
/util-linux-2.30.2.tar.xz
|
||||||
|
/util-linux-2.31-rc1.tar.xz
|
||||||
|
/util-linux-2.31-rc2.tar.xz
|
||||||
|
/util-linux-2.31.tar.xz
|
||||||
|
/util-linux-2.32-rc1.tar.xz
|
||||||
|
/util-linux-2.32.tar.xz
|
||||||
|
/util-linux-2.32.1.tar.xz
|
||||||
|
/util-linux-2.33-rc2.tar.xz
|
||||||
|
/util-linux-2.33.1.tar.xz
|
||||||
|
/util-linux-2.33.2.tar.xz
|
||||||
|
/util-linux-2.34-rc1.tar.xz
|
||||||
|
/util-linux-2.34-rc2.tar.xz
|
||||||
|
/util-linux-2.34.tar.xz
|
||||||
|
/util-linux-2.35-rc1.tar.xz
|
||||||
|
/util-linux-2.35-rc1-20-63f8.tar.xz
|
||||||
|
/util-linux-2.35-rc2.tar.xz
|
||||||
|
/util-linux-2.35.tar.xz
|
||||||
|
/util-linux-2.35.1.tar.xz
|
||||||
|
/util-linux-2.35.2.tar.xz
|
||||||
|
/util-linux-2.36.tar.xz
|
||||||
|
/util-linux-2.36.1.tar.xz
|
||||||
|
/util-linux-2.36.2.tar.xz
|
||||||
|
/util-linux-2.37-rc2.tar.xz
|
||||||
|
/util-linux-2.37.tar.xz
|
||||||
|
/util-linux-2.37.2.tar.xz
|
||||||
|
/util-linux-2.38-rc1.tar.xz
|
||||||
|
/util-linux-2.38-rc3.tar.xz
|
||||||
|
/util-linux-2.38.tar.xz
|
||||||
|
/util-linux-2.38.1.tar.xz
|
||||||
|
/util-linux-2.39-rc1.tar.xz
|
||||||
|
/util-linux-2.39-rc2.tar.xz
|
||||||
|
/util-linux-2.39-rc3.tar.xz
|
||||||
|
/util-linux-2.39.tar.xz
|
||||||
|
/util-linux-2.39.1.tar.xz
|
||||||
|
/util-linux-2.39.2.tar.xz
|
||||||
|
/util-linux-2.39.3.tar.xz
|
||||||
|
/util-linux-2.40-rc1.tar.xz
|
||||||
|
/util-linux-2.40.tar.xz
|
||||||
|
/util-linux-2.40.1.tar.xz
|
||||||
|
/util-linux-2.40.2.tar.xz
|
||||||
|
/util-linux-2.40.4.tar.xz
|
||||||
|
/util-linux-2.41.tar.xz
|
||||||
|
/util-linux-2.41.1.tar.xz
|
||||||
|
/util-linux-2.41.2.tar.xz
|
||||||
|
/util-linux-2.41.3.tar.xz
|
||||||
|
/util-linux-2.42.tar.xz
|
||||||
|
/util-linux-2.42.1.tar.xz
|
||||||
|
/util-linux-2.42.2.tar.xz
|
||||||
|
|
|
||||||
27
0000-login-use-O_CREAT-on-lastlog.patch
Normal file
27
0000-login-use-O_CREAT-on-lastlog.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
From a2357184ff3dc3beb001fcb12e1e4c0dcf8d0dbd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
Date: Tue, 2 Dec 2025 16:15:44 +0100
|
||||||
|
Subject: login: use O_CREAT on lastlog
|
||||||
|
|
||||||
|
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=151635
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
login-utils/login.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/login-utils/login.c b/login-utils/login.c
|
||||||
|
index 321f9d6ce..edc69fd9a 100644
|
||||||
|
--- a/login-utils/login.c
|
||||||
|
+++ b/login-utils/login.c
|
||||||
|
@@ -682,7 +682,7 @@ static void log_lastlog(struct login_context *cxt)
|
||||||
|
sa.sa_handler = SIG_IGN;
|
||||||
|
sigaction(SIGXFSZ, &sa, &oldsa_xfsz);
|
||||||
|
|
||||||
|
- fd = open(_PATH_LASTLOG, O_RDWR, 0);
|
||||||
|
+ fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0);
|
||||||
|
if (fd < 0)
|
||||||
|
goto done;
|
||||||
|
offset = cxt->pwd->pw_uid * sizeof(ll);
|
||||||
|
--
|
||||||
|
2.51.1
|
||||||
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
From 6eeca6c7170295f325b814ee0cd1576da885cd30 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Mon, 15 Oct 2012 11:10:50 +0200
|
|
||||||
Subject: [PATCH 01/11] libmount: don't use umount optimization for -l or -f
|
|
||||||
|
|
||||||
The options -l (lazy) and -f (force) means that the mountpoint may be
|
|
||||||
unreadable (for example because NFS server is unreadable). So we
|
|
||||||
should not try to be smart in this case and we should try to minimize
|
|
||||||
number of situations when stat() or readlink() is used for the
|
|
||||||
mountpoint.
|
|
||||||
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
libmount/src/context_umount.c | 4 +++-
|
|
||||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c
|
|
||||||
index ce095bf..2c2e64c 100644
|
|
||||||
--- a/libmount/src/context_umount.c
|
|
||||||
+++ b/libmount/src/context_umount.c
|
|
||||||
@@ -83,7 +83,9 @@ static int lookup_umount_fs(struct libmnt_context *cxt)
|
|
||||||
* where LABEL, UUID or symlinks are to canonicalized. It means that
|
|
||||||
* it's usable only for canonicalized stuff (e.g. kernel mountinfo).
|
|
||||||
*/
|
|
||||||
- if (!cxt->mtab_writable && *tgt == '/') {
|
|
||||||
+ if (!cxt->mtab_writable && *tgt == '/' &&
|
|
||||||
+ !mnt_context_is_force(cxt) && !mnt_context_is_lazy(cxt)) {
|
|
||||||
+
|
|
||||||
struct stat st;
|
|
||||||
|
|
||||||
if (stat(tgt, &st) == 0 && S_ISDIR(st.st_mode)) {
|
|
||||||
--
|
|
||||||
1.7.11.7
|
|
||||||
|
|
||||||
27
0001-login-add-run-motd.d-to-the-hardcoded-MOTD_FILE.patch
Normal file
27
0001-login-add-run-motd.d-to-the-hardcoded-MOTD_FILE.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
From 617a887a6ec7e433f6a9f4c60592ed38b12b9f18 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
Date: Tue, 2 Dec 2025 16:17:55 +0100
|
||||||
|
Subject: login: add /run/motd.d` to the hardcoded MOTD_FILE
|
||||||
|
|
||||||
|
Addresses: https://github.com/coreos/console-login-helper-messages/issues/60
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
include/pathnames.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/include/pathnames.h b/include/pathnames.h
|
||||||
|
index 34ba11ca3..c91a077e1 100644
|
||||||
|
--- a/include/pathnames.h
|
||||||
|
+++ b/include/pathnames.h
|
||||||
|
@@ -41,7 +41,7 @@
|
||||||
|
#ifndef _PATH_MAILDIR
|
||||||
|
# define _PATH_MAILDIR "/var/spool/mail"
|
||||||
|
#endif
|
||||||
|
-#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/etc/motd"
|
||||||
|
+#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/run/motd.d:/etc/motd:/etc/motd.d"
|
||||||
|
#ifndef _PATH_NOLOGIN
|
||||||
|
# define _PATH_NOLOGIN "/etc/nologin"
|
||||||
|
#endif
|
||||||
|
--
|
||||||
|
2.51.1
|
||||||
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
From 9faf9c8494cf37fdcf68b1dfe10fd7900e93ec00 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Mon, 15 Oct 2012 12:38:09 +0200
|
|
||||||
Subject: [PATCH 02/11] wipefs: use O_EXCL
|
|
||||||
|
|
||||||
Address: https://bugzilla.redhat.com/show_bug.cgi?id=865961
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
misc-utils/wipefs.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c
|
|
||||||
index cddad8a..0ddc148 100644
|
|
||||||
--- a/misc-utils/wipefs.c
|
|
||||||
+++ b/misc-utils/wipefs.c
|
|
||||||
@@ -309,7 +309,7 @@ static void do_wipe_real(blkid_probe pr, const char *devname, struct wipe_desc *
|
|
||||||
static struct wipe_desc *
|
|
||||||
do_wipe(struct wipe_desc *wp, const char *devname, int noact, int all, int quiet)
|
|
||||||
{
|
|
||||||
- blkid_probe pr = new_probe(devname, O_RDWR);
|
|
||||||
+ blkid_probe pr = new_probe(devname, O_RDWR | O_EXCL);
|
|
||||||
struct wipe_desc *w, *wp0 = clone_offset(wp);
|
|
||||||
int zap = all ? 1 : wp->zap;
|
|
||||||
|
|
||||||
--
|
|
||||||
1.7.11.7
|
|
||||||
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
From 10a9cbcf36d43c0d4a13bf5e91315b4ffd29e636 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Sami Kerola <kerolasa@iki.fi>
|
|
||||||
Date: Mon, 8 Oct 2012 08:08:20 +0100
|
|
||||||
Subject: [PATCH 03/11] swapon: remove loop declaration [smatch scan]
|
|
||||||
|
|
||||||
sys-utils/swapon.c:677:2: error: 'for' loop initial declarations are
|
|
||||||
only allowed in C99 mode
|
|
||||||
|
|
||||||
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
||||||
---
|
|
||||||
sys-utils/swapon.c | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c
|
|
||||||
index c9cabc1..0e1ab66 100644
|
|
||||||
--- a/sys-utils/swapon.c
|
|
||||||
+++ b/sys-utils/swapon.c
|
|
||||||
@@ -642,6 +642,7 @@ static int swapon_all(void)
|
|
||||||
|
|
||||||
static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
|
||||||
{
|
|
||||||
+ size_t i;
|
|
||||||
fputs(USAGE_HEADER, out);
|
|
||||||
|
|
||||||
fprintf(out, _(" %s [options] [<spec>]\n"), program_invocation_short_name);
|
|
||||||
@@ -674,7 +675,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
|
||||||
" <file> name of file to be used\n"), out);
|
|
||||||
|
|
||||||
fputs(_("\nAvailable columns (for --show):\n"), out);
|
|
||||||
- for (size_t i = 0; i < NCOLS; i++)
|
|
||||||
+ for (i = 0; i < NCOLS; i++)
|
|
||||||
fprintf(out, " %4s %s\n", infos[i].name, _(infos[i].help));
|
|
||||||
|
|
||||||
fprintf(out, USAGE_MAN_TAIL("swapon(8)"));
|
|
||||||
--
|
|
||||||
1.7.11.7
|
|
||||||
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
From 9f6c8591eeffb6591dc6a18512e618f0acf09890 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Mon, 15 Oct 2012 17:01:30 +0200
|
|
||||||
Subject: [PATCH 04/11] libblkid: fix compiler warning [-Wstrict-aliasing]
|
|
||||||
|
|
||||||
libblkid/src/superblocks/befs.c: In function 'get_uuid':
|
|
||||||
libblkid/src/superblocks/befs.c:353:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
|
|
||||||
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
libblkid/src/superblocks/befs.c | 8 +++++---
|
|
||||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libblkid/src/superblocks/befs.c b/libblkid/src/superblocks/befs.c
|
|
||||||
index a7f4317..452da1e 100644
|
|
||||||
--- a/libblkid/src/superblocks/befs.c
|
|
||||||
+++ b/libblkid/src/superblocks/befs.c
|
|
||||||
@@ -348,9 +348,11 @@ static int get_uuid(blkid_probe pr, const struct befs_super_block *bs,
|
|
||||||
&& FS16_TO_CPU(sd->name_size, fs_le) == strlen(KEY_NAME)
|
|
||||||
&& FS16_TO_CPU(sd->data_size, fs_le) == KEY_SIZE
|
|
||||||
&& strcmp(sd->name, KEY_NAME) == 0) {
|
|
||||||
- *uuid = *(uint64_t *) ((uint8_t *) sd->name
|
|
||||||
- + FS16_TO_CPU(sd->name_size, fs_le)
|
|
||||||
- + 3);
|
|
||||||
+
|
|
||||||
+ memcpy(uuid,
|
|
||||||
+ sd->name + FS16_TO_CPU(sd->name_size, fs_le) + 3,
|
|
||||||
+ sizeof(uint64_t));
|
|
||||||
+
|
|
||||||
break;
|
|
||||||
} else if (FS32_TO_CPU(sd->type, fs_le) == 0
|
|
||||||
&& FS16_TO_CPU(sd->name_size, fs_le) == 0
|
|
||||||
--
|
|
||||||
1.7.11.7
|
|
||||||
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
From 532116d4dd16632806ed4a036c2e89b966221031 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Bill Pemberton <wfp5p@virginia.edu>
|
|
||||||
Date: Wed, 10 Oct 2012 16:54:01 -0400
|
|
||||||
Subject: [PATCH 05/11] mount: add -c abbreviation for --no-canonicalize to
|
|
||||||
man page
|
|
||||||
|
|
||||||
The --no-canonicalize option can also be set using -c. The --help for
|
|
||||||
mount shows this option but the man page did not. Add -c to the man
|
|
||||||
page.
|
|
||||||
|
|
||||||
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
|
|
||||||
---
|
|
||||||
sys-utils/mount.8 | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/sys-utils/mount.8 b/sys-utils/mount.8
|
|
||||||
index dce4b8c..83a4518 100644
|
|
||||||
--- a/sys-utils/mount.8
|
|
||||||
+++ b/sys-utils/mount.8
|
|
||||||
@@ -552,7 +552,7 @@ Mount without writing in
|
|
||||||
This is necessary for example when
|
|
||||||
.I /etc
|
|
||||||
is on a read-only filesystem.
|
|
||||||
-.IP "\fB\-\-no\-canonicalize\fP"
|
|
||||||
+.IP "\fB\-c, \-\-no\-canonicalize\fP"
|
|
||||||
Don't canonicalize paths. The mount command canonicalizes all paths
|
|
||||||
(from command line or fstab) and stores canonicalized paths to the
|
|
||||||
.IR /etc/mtab
|
|
||||||
--
|
|
||||||
1.7.11.7
|
|
||||||
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
From b426209c5ba2126a9038363a269fec884af470fb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Bill Pemberton <wfp5p@virginia.edu>
|
|
||||||
Date: Wed, 10 Oct 2012 16:54:02 -0400
|
|
||||||
Subject: [PATCH 06/11] mount: add long options for -L and -U to man page
|
|
||||||
|
|
||||||
The -L and -U flags both have long options too (--label and --uuid).
|
|
||||||
The usage() function will show them but the man page didn't list them.
|
|
||||||
|
|
||||||
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
|
|
||||||
---
|
|
||||||
sys-utils/mount.8 | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/sys-utils/mount.8 b/sys-utils/mount.8
|
|
||||||
index 83a4518..0b40bf7 100644
|
|
||||||
--- a/sys-utils/mount.8
|
|
||||||
+++ b/sys-utils/mount.8
|
|
||||||
@@ -586,10 +586,10 @@ set the block device to read-only mode, see command
|
|
||||||
.IP "\fB\-w, \-\-rw\fP"
|
|
||||||
Mount the filesystem read/write. This is the default. A synonym is
|
|
||||||
.BR "\-o rw" .
|
|
||||||
-.IP "\fB\-L \fIlabel\fP"
|
|
||||||
+.IP "\fB\-L, \-\-label \fIlabel\fP"
|
|
||||||
Mount the partition that has the specified
|
|
||||||
.IR label .
|
|
||||||
-.IP "\fB\-U \fIuuid\fP"
|
|
||||||
+.IP "\fB\-U, \-\-uuid \fIuuid\fP"
|
|
||||||
Mount the partition that has the specified
|
|
||||||
.IR uuid .
|
|
||||||
These two options require the file
|
|
||||||
--
|
|
||||||
1.7.11.7
|
|
||||||
|
|
||||||
|
|
@ -1,107 +0,0 @@
|
||||||
From deb0e659451d4ade29df3dbb842607edd6080c0d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Wed, 17 Oct 2012 11:42:21 +0200
|
|
||||||
Subject: [PATCH 07/11] lib/loopdev: improve debug messages
|
|
||||||
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
lib/loopdev.c | 22 ++++++++++++++++++----
|
|
||||||
sys-utils/losetup.c | 2 --
|
|
||||||
2 files changed, 18 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/loopdev.c b/lib/loopdev.c
|
|
||||||
index a9f6df2..0e6033a 100644
|
|
||||||
--- a/lib/loopdev.c
|
|
||||||
+++ b/lib/loopdev.c
|
|
||||||
@@ -87,8 +87,10 @@ int loopcxt_set_device(struct loopdev_cxt *lc, const char *device)
|
|
||||||
if (!lc)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
- if (lc->fd >= 0)
|
|
||||||
+ if (lc->fd >= 0) {
|
|
||||||
close(lc->fd);
|
|
||||||
+ DBG(lc, loopdev_debug("closing old open fd"));
|
|
||||||
+ }
|
|
||||||
lc->fd = -1;
|
|
||||||
lc->mode = 0;
|
|
||||||
lc->has_info = 0;
|
|
||||||
@@ -158,19 +160,26 @@ int loopcxt_init(struct loopdev_cxt *lc, int flags)
|
|
||||||
memcpy(lc, &dummy, sizeof(dummy));
|
|
||||||
lc->flags = flags;
|
|
||||||
|
|
||||||
+ if (getenv("LOOPDEV_DEBUG"))
|
|
||||||
+ loopcxt_enable_debug(lc, TRUE);
|
|
||||||
+
|
|
||||||
rc = loopcxt_set_device(lc, NULL);
|
|
||||||
if (rc)
|
|
||||||
return rc;
|
|
||||||
|
|
||||||
if (!(lc->flags & LOOPDEV_FL_NOSYSFS) &&
|
|
||||||
- get_linux_version() >= KERNEL_VERSION(2,6,37))
|
|
||||||
+ get_linux_version() >= KERNEL_VERSION(2,6,37)) {
|
|
||||||
/*
|
|
||||||
* Use only sysfs for basic information about loop devices
|
|
||||||
*/
|
|
||||||
lc->flags |= LOOPDEV_FL_NOIOCTL;
|
|
||||||
+ DBG(lc, loopdev_debug("init: ignore ioctls"));
|
|
||||||
+ }
|
|
||||||
|
|
||||||
- if (!(lc->flags & LOOPDEV_FL_CONTROL) && !stat(_PATH_DEV_LOOPCTL, &st))
|
|
||||||
+ if (!(lc->flags & LOOPDEV_FL_CONTROL) && !stat(_PATH_DEV_LOOPCTL, &st)) {
|
|
||||||
lc->flags |= LOOPDEV_FL_CONTROL;
|
|
||||||
+ DBG(lc, loopdev_debug("init: loop-control detected "));
|
|
||||||
+ }
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -272,7 +281,9 @@ int loopcxt_get_fd(struct loopdev_cxt *lc)
|
|
||||||
if (lc->fd < 0) {
|
|
||||||
lc->mode = lc->flags & LOOPDEV_FL_RDWR ? O_RDWR : O_RDONLY;
|
|
||||||
lc->fd = open(lc->device, lc->mode);
|
|
||||||
- DBG(lc, loopdev_debug("open %s", lc->fd < 0 ? "failed" : "ok"));
|
|
||||||
+ DBG(lc, loopdev_debug("open %s [%s]: %s", lc->device,
|
|
||||||
+ lc->flags & LOOPDEV_FL_RDWR ? "rw" : "ro",
|
|
||||||
+ lc->fd < 0 ? "failed" : "ok"));
|
|
||||||
}
|
|
||||||
return lc->fd;
|
|
||||||
}
|
|
||||||
@@ -576,6 +587,7 @@ int loopcxt_next(struct loopdev_cxt *lc)
|
|
||||||
* of loop devices). This is enough for 99% of all cases.
|
|
||||||
*/
|
|
||||||
if (iter->default_check) {
|
|
||||||
+ DBG(lc, loopdev_debug("iter: next: default check"));
|
|
||||||
for (++iter->ncur; iter->ncur < LOOPDEV_DEFAULT_NNODES;
|
|
||||||
iter->ncur++) {
|
|
||||||
char name[16];
|
|
||||||
@@ -590,6 +602,7 @@ int loopcxt_next(struct loopdev_cxt *lc)
|
|
||||||
/* C) the worst possibility, scan whole /dev or /dev/loop/<N>
|
|
||||||
*/
|
|
||||||
if (!iter->minors) {
|
|
||||||
+ DBG(lc, loopdev_debug("iter: next: scan /dev"));
|
|
||||||
iter->nminors = (lc->flags & LOOPDEV_FL_DEVSUBDIR) ?
|
|
||||||
loop_scandir(_PATH_DEV_LOOP, &iter->minors, 0) :
|
|
||||||
loop_scandir(_PATH_DEV, &iter->minors, 1);
|
|
||||||
@@ -1150,6 +1163,7 @@ int loopcxt_setup_device(struct loopdev_cxt *lc)
|
|
||||||
DBG(lc, loopdev_debug("setup: backing file open: OK"));
|
|
||||||
|
|
||||||
if (lc->fd != -1 && lc->mode != mode) {
|
|
||||||
+ DBG(lc, loopdev_debug("closing already open device (mode mismatch)"));
|
|
||||||
close(lc->fd);
|
|
||||||
lc->fd = -1;
|
|
||||||
lc->mode = 0;
|
|
||||||
diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c
|
|
||||||
index fdcc0be..a8381a8 100644
|
|
||||||
--- a/sys-utils/losetup.c
|
|
||||||
+++ b/sys-utils/losetup.c
|
|
||||||
@@ -250,8 +250,6 @@ int main(int argc, char **argv)
|
|
||||||
if (loopcxt_init(&lc, 0))
|
|
||||||
err(EXIT_FAILURE, _("failed to initialize loopcxt"));
|
|
||||||
|
|
||||||
- loopcxt_enable_debug(&lc, getenv("LOOPDEV_DEBUG") ? TRUE : FALSE);
|
|
||||||
-
|
|
||||||
while ((c = getopt_long(argc, argv, "ac:d:De:E:fhj:o:p:PrvV",
|
|
||||||
longopts, NULL)) != -1) {
|
|
||||||
|
|
||||||
--
|
|
||||||
1.7.11.7
|
|
||||||
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
From 939636dd664cc608232c272de77be96e6f089235 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Wed, 17 Oct 2012 11:43:39 +0200
|
|
||||||
Subject: [PATCH 08/11] lib/loopdev: check for /sys
|
|
||||||
|
|
||||||
The current loopdev code prefers /sys to get information about
|
|
||||||
loop devices. The old methods like scan /dev are fallback solution
|
|
||||||
only. Unfortunately, the code does not check if /sys is mounted.
|
|
||||||
|
|
||||||
Addresses: http://blog.flameeyes.eu/2012/10/sophistication-can-be-bad
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
lib/loopdev.c | 6 ++++++
|
|
||||||
1 file changed, 6 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/lib/loopdev.c b/lib/loopdev.c
|
|
||||||
index 0e6033a..f62af83 100644
|
|
||||||
--- a/lib/loopdev.c
|
|
||||||
+++ b/lib/loopdev.c
|
|
||||||
@@ -167,6 +167,12 @@ int loopcxt_init(struct loopdev_cxt *lc, int flags)
|
|
||||||
if (rc)
|
|
||||||
return rc;
|
|
||||||
|
|
||||||
+ if (stat(_PATH_SYS_BLOCK, &st) || !S_ISDIR(st.st_mode)) {
|
|
||||||
+ lc->flags |= LOOPDEV_FL_NOSYSFS;
|
|
||||||
+ lc->flags &= ~LOOPDEV_FL_NOIOCTL;
|
|
||||||
+ DBG(lc, loopdev_debug("init: disable /sys usage"));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (!(lc->flags & LOOPDEV_FL_NOSYSFS) &&
|
|
||||||
get_linux_version() >= KERNEL_VERSION(2,6,37)) {
|
|
||||||
/*
|
|
||||||
--
|
|
||||||
1.7.11.7
|
|
||||||
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
From 75f03f036011003c2a9e8e634ca3ce7930873318 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Mon, 22 Oct 2012 10:10:55 +0200
|
|
||||||
Subject: [PATCH 09/11] fsck.cramfs: compile with -DINCLUDE_FS_TESTS for make
|
|
||||||
check
|
|
||||||
|
|
||||||
make check
|
|
||||||
sudo su -
|
|
||||||
cd tests
|
|
||||||
./run.sh cramfs
|
|
||||||
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
disk-utils/Makemodule.am | 5 +++++
|
|
||||||
tests/commands.sh | 2 +-
|
|
||||||
2 files changed, 6 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/disk-utils/Makemodule.am b/disk-utils/Makemodule.am
|
|
||||||
index f2360bf..b329a99 100644
|
|
||||||
--- a/disk-utils/Makemodule.am
|
|
||||||
+++ b/disk-utils/Makemodule.am
|
|
||||||
@@ -97,6 +97,11 @@ fsck_cramfs_LDADD = $(LDADD) -lz libcommon.la
|
|
||||||
sbin_PROGRAMS += mkfs.cramfs
|
|
||||||
mkfs_cramfs_SOURCES = disk-utils/mkfs.cramfs.c $(cramfs_common_sources)
|
|
||||||
mkfs_cramfs_LDADD = $(LDADD) -lz libcommon.la
|
|
||||||
+
|
|
||||||
+check_PROGRAMS += test_fsck.cramfs
|
|
||||||
+test_fsck_cramfs_SOURCES = $(fsck_cramfs_SOURCES)
|
|
||||||
+test_fsck_cramfs_LDADD = $(fsck_cramfs_LDADD)
|
|
||||||
+test_fsck_cramfs_CFLAGS = $(AM_CFLAGS) -DINCLUDE_FS_TESTS
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/tests/commands.sh b/tests/commands.sh
|
|
||||||
index 8a1577e..db1d4ac 100644
|
|
||||||
--- a/tests/commands.sh
|
|
||||||
+++ b/tests/commands.sh
|
|
||||||
@@ -37,7 +37,7 @@ TS_CMD_LOSETUP=${TS_CMD_LOSETUP:-"$top_builddir/losetup"}
|
|
||||||
TS_CMD_MKSWAP=${TS_CMD_MKSWAP:-"$top_builddir/mkswap"}
|
|
||||||
TS_CMD_MKCRAMFS=${TS_CMD_MKCRAMFS:-"$top_builddir/mkfs.cramfs"}
|
|
||||||
TS_CMD_MKMINIX=${TS_CMD_MKMINIX:-"$top_builddir/mkfs.minix"}
|
|
||||||
-TS_CMD_FSCKCRAMFS=${TS_CMD_FSCKCRAMFS:-"$top_builddir/fsck.cramfs"}
|
|
||||||
+TS_CMD_FSCKCRAMFS=${TS_CMD_FSCKCRAMFS:-"$top_builddir/test_fsck.cramfs"}
|
|
||||||
TS_CMD_FSCKMINIX=${TS_CMD_FSCKMINIX:-"$top_builddir/fsck.minix"}
|
|
||||||
|
|
||||||
TS_CMD_IPCS=${TS_CMD_IPCS:-"$top_builddir/ipcs"}
|
|
||||||
--
|
|
||||||
1.7.11.7
|
|
||||||
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
From ed68f1e2f5609a3f42492df407d62b8fc006ea17 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Mon, 22 Oct 2012 13:13:02 +0200
|
|
||||||
Subject: [PATCH 10/11] login: fix compiler warning [-Wunused-result]
|
|
||||||
|
|
||||||
It's probably unnecessary paranoia, but let's check if we're able to
|
|
||||||
restore the original IDs after ~/.hushlogin file check.
|
|
||||||
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
login-utils/login.c | 16 ++++++++++------
|
|
||||||
1 file changed, 10 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/login-utils/login.c b/login-utils/login.c
|
|
||||||
index 8ae5266..f5896da 100644
|
|
||||||
--- a/login-utils/login.c
|
|
||||||
+++ b/login-utils/login.c
|
|
||||||
@@ -1031,13 +1031,17 @@ static int get_hushlogin_status(struct passwd *pwd)
|
|
||||||
gid_t egid = getegid();
|
|
||||||
|
|
||||||
sprintf(buf, "%s/%s", pwd->pw_dir, file);
|
|
||||||
- setregid(-1, pwd->pw_gid);
|
|
||||||
- setreuid(0, pwd->pw_uid);
|
|
||||||
- ok = effective_access(buf, O_RDONLY) == 0;
|
|
||||||
- setuid(0); /* setreuid doesn't do it alone! */
|
|
||||||
- setreuid(ruid, 0);
|
|
||||||
- setregid(-1, egid);
|
|
||||||
|
|
||||||
+ if (setregid(-1, pwd->pw_gid) == 0 &&
|
|
||||||
+ setreuid(0, pwd->pw_uid) == 0)
|
|
||||||
+ ok = effective_access(buf, O_RDONLY) == 0;
|
|
||||||
+
|
|
||||||
+ if (setuid(0) != 0 ||
|
|
||||||
+ setreuid(ruid, 0) != 0 ||
|
|
||||||
+ setregid(-1, egid) != 0) {
|
|
||||||
+ syslog(LOG_ALERT, _("hush login status: restore original IDs failed"));
|
|
||||||
+ exit(EXIT_FAILURE);
|
|
||||||
+ }
|
|
||||||
if (ok)
|
|
||||||
return 1; /* enabled by user */
|
|
||||||
}
|
|
||||||
--
|
|
||||||
1.7.11.7
|
|
||||||
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
From a3528342bc716ecdabdd86609ae5a3198f560870 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Tue, 23 Oct 2012 12:40:39 +0200
|
|
||||||
Subject: [PATCH 11/11] misc: make readlink() usage more robust
|
|
||||||
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
misc-utils/lsblk.c | 4 ++--
|
|
||||||
misc-utils/lslocks.c | 2 +-
|
|
||||||
sys-utils/eject.c | 2 +-
|
|
||||||
3 files changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
|
|
||||||
index cc97c05..9c25dd0 100644
|
|
||||||
--- a/misc-utils/lsblk.c
|
|
||||||
+++ b/misc-utils/lsblk.c
|
|
||||||
@@ -962,7 +962,7 @@ static int get_wholedisk_from_partition_dirent(DIR *dir, const char *dirname,
|
|
||||||
int len;
|
|
||||||
|
|
||||||
if ((len = readlink_at(dirfd(dir), dirname,
|
|
||||||
- d->d_name, path, sizeof(path))) < 0)
|
|
||||||
+ d->d_name, path, sizeof(path) - 1)) < 0)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
path[len] = '\0';
|
|
||||||
@@ -1075,7 +1075,7 @@ static char *devno_to_sysfs_name(dev_t devno, char *devname, char *buf, size_t b
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
- len = readlink(path, buf, buf_size);
|
|
||||||
+ len = readlink(path, buf, buf_size - 1);
|
|
||||||
if (len < 0) {
|
|
||||||
warn(_("%s: failed to read link"), path);
|
|
||||||
return NULL;
|
|
||||||
diff --git a/misc-utils/lslocks.c b/misc-utils/lslocks.c
|
|
||||||
index 45fb6de..495eb80 100644
|
|
||||||
--- a/misc-utils/lslocks.c
|
|
||||||
+++ b/misc-utils/lslocks.c
|
|
||||||
@@ -196,7 +196,7 @@ static char *get_filename_sz(ino_t inode, pid_t pid, size_t *size)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if ((len = readlink_at(fd, path, dp->d_name,
|
|
||||||
- sym, sizeof(path))) < 1)
|
|
||||||
+ sym, sizeof(sym) - 1)) < 1)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
*size = sb.st_size;
|
|
||||||
diff --git a/sys-utils/eject.c b/sys-utils/eject.c
|
|
||||||
index 1a5b834..6d0da18 100644
|
|
||||||
--- a/sys-utils/eject.c
|
|
||||||
+++ b/sys-utils/eject.c
|
|
||||||
@@ -837,7 +837,7 @@ static char *get_subsystem(char *chain, char *buf, size_t bufsz)
|
|
||||||
memcpy(chain + len, SUBSYSTEM_LINKNAME, sizeof(SUBSYSTEM_LINKNAME));
|
|
||||||
|
|
||||||
/* try if subsystem symlink exists */
|
|
||||||
- sz = readlink(chain, buf, bufsz);
|
|
||||||
+ sz = readlink(chain, buf, bufsz - 1);
|
|
||||||
|
|
||||||
/* remove last subsystem from chain */
|
|
||||||
chain[len] = '\0';
|
|
||||||
--
|
|
||||||
1.7.11.7
|
|
||||||
|
|
||||||
12
STAGE1-util-linux
Normal file
12
STAGE1-util-linux
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
srpm util-linux
|
||||||
|
mcd $BUILDDIR/$1
|
||||||
|
cat <<EOF > config.cache
|
||||||
|
ax_cv_have_tls=yes
|
||||||
|
scanf_cv_alloc_modifier=ms
|
||||||
|
EOF
|
||||||
|
$SRC/${1}-*/configure $TCONFIGARGS --without-ncurses --without-tinfo \
|
||||||
|
--prefix=/usr --libexecdir=/usr/lib${SUFFIX} --libdir=/usr/lib${SUFFIX} \
|
||||||
|
--disable-wall --cache-file=config.cache --without-python --without-systemd
|
||||||
|
notparallel
|
||||||
|
make $J V=1
|
||||||
|
make $J install DESTDIR=${ROOTFS}
|
||||||
2
adjtime
Normal file
2
adjtime
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
0.0 0 0.0
|
||||||
|
0
|
||||||
63
nologin.8
63
nologin.8
|
|
@ -1,63 +0,0 @@
|
||||||
.\" $OpenBSD: nologin.8,v 1.8 1999/06/04 02:45:19 aaron Exp $
|
|
||||||
.\" $NetBSD: nologin.8,v 1.3 1995/03/18 14:59:09 cgd Exp $
|
|
||||||
.\"
|
|
||||||
.\" Copyright (c) 1993
|
|
||||||
.\" The Regents of the University of California. All rights reserved.
|
|
||||||
.\"
|
|
||||||
.\" Redistribution and use in source and binary forms, with or without
|
|
||||||
.\" modification, are permitted provided that the following conditions
|
|
||||||
.\" are met:
|
|
||||||
.\" 1. Redistributions of source code must retain the above copyright
|
|
||||||
.\" notice, this list of conditions and the following disclaimer.
|
|
||||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
.\" notice, this list of conditions and the following disclaimer in the
|
|
||||||
.\" documentation and/or other materials provided with the distribution.
|
|
||||||
.\" 3. All advertising materials mentioning features or use of this software
|
|
||||||
.\" must display the following acknowledgement:
|
|
||||||
.\" This product includes software developed by the University of
|
|
||||||
.\" California, Berkeley and its contributors.
|
|
||||||
.\" 4. Neither the name of the University nor the names of its contributors
|
|
||||||
.\" may be used to endorse or promote products derived from this software
|
|
||||||
.\" without specific prior written permission.
|
|
||||||
.\"
|
|
||||||
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
||||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
||||||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
||||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
||||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
||||||
.\" SUCH DAMAGE.
|
|
||||||
.\"
|
|
||||||
.\" @(#)nologin.8 8.1 (Berkeley) 6/19/93
|
|
||||||
.\"
|
|
||||||
.Dd February 15, 1997
|
|
||||||
.Dt NOLOGIN 8
|
|
||||||
.Os
|
|
||||||
.Sh NAME
|
|
||||||
.Nm nologin
|
|
||||||
.Nd politely refuse a login
|
|
||||||
.Sh SYNOPSIS
|
|
||||||
.Nm nologin
|
|
||||||
.Sh DESCRIPTION
|
|
||||||
.Nm
|
|
||||||
displays a message that an account is not available and
|
|
||||||
exits non-zero.
|
|
||||||
It is intended as a replacement shell field for accounts that
|
|
||||||
have been disabled.
|
|
||||||
.Pp
|
|
||||||
If the file
|
|
||||||
.Pa /etc/nologin.txt
|
|
||||||
exists,
|
|
||||||
.Nm
|
|
||||||
displays its contents to the user instead of the default message.
|
|
||||||
.Sh SEE ALSO
|
|
||||||
.Xr login 1
|
|
||||||
.Sh HISTORY
|
|
||||||
The
|
|
||||||
.Nm
|
|
||||||
command appeared in
|
|
||||||
.Bx 4.4 .
|
|
||||||
58
nologin.c
58
nologin.c
|
|
@ -1,58 +0,0 @@
|
||||||
/* $OpenBSD: nologin.c,v 1.2 1997/04/04 16:51:37 millert Exp $ */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1997, Jason Downs. All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
|
|
||||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
|
|
||||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
||||||
* SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
/* Distinctly different from _PATH_NOLOGIN. */
|
|
||||||
#define _PATH_NOLOGIN_TXT "/etc/nologin.txt"
|
|
||||||
|
|
||||||
#define DEFAULT_MESG "This account is currently not available.\n"
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
|
||||||
int main(argc, argv)
|
|
||||||
int argc;
|
|
||||||
char *argv[];
|
|
||||||
{
|
|
||||||
int nfd, nrd;
|
|
||||||
char nbuf[128];
|
|
||||||
|
|
||||||
nfd = open(_PATH_NOLOGIN_TXT, O_RDONLY);
|
|
||||||
if (nfd < 0) {
|
|
||||||
write(STDOUT_FILENO, DEFAULT_MESG, strlen(DEFAULT_MESG));
|
|
||||||
exit (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
while ((nrd = read(nfd, nbuf, sizeof(nbuf))) > 0)
|
|
||||||
write(STDOUT_FILENO, nbuf, nrd);
|
|
||||||
close (nfd);
|
|
||||||
|
|
||||||
exit (1);
|
|
||||||
}
|
|
||||||
5
plans/ci.fmf
Normal file
5
plans/ci.fmf
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
summary: Basic smoke test
|
||||||
|
discover:
|
||||||
|
how: fmf
|
||||||
|
execute:
|
||||||
|
how: tmt
|
||||||
3
sources
3
sources
|
|
@ -1,2 +1 @@
|
||||||
c6c15a1afc04d8a69d5b99db1c39623f util-linux-2.22.1.tar.xz
|
SHA512 (util-linux-2.42.2.tar.xz) = 7415add0be2930654e322830808dde03ff6d511bd357f0679e6b6287a13ca79fe58ce4ac05edef86b76fb381b3a36ca2da9d3c31b5dc0a1d889c203156a57277
|
||||||
a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2
|
|
||||||
|
|
|
||||||
64
tests/various/Makefile
Normal file
64
tests/various/Makefile
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Makefile of /CoreOS/util-linux/various
|
||||||
|
# Description: This test groups small sanity and regression tests for util-linux
|
||||||
|
# Author: Miroslav Vadkerti <mvadkert@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# This copyrighted material is made available to anyone wishing
|
||||||
|
# to use, modify, copy, or redistribute it subject to the terms
|
||||||
|
# and conditions of the GNU General Public License version 2.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be
|
||||||
|
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
# PURPOSE. See the GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public
|
||||||
|
# License along with this program; if not, write to the Free
|
||||||
|
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
# Boston, MA 02110-1301, USA.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
export TEST=/CoreOS/util-linux/Sanity/various
|
||||||
|
export TESTVERSION=1.0
|
||||||
|
|
||||||
|
BUILT_FILES=
|
||||||
|
|
||||||
|
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
||||||
|
|
||||||
|
.PHONY: all install download clean
|
||||||
|
|
||||||
|
run: $(FILES) build
|
||||||
|
./runtest.sh
|
||||||
|
|
||||||
|
build: $(BUILT_FILES)
|
||||||
|
test -x runtest.sh || chmod a+x runtest.sh
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *~ $(BUILT_FILES)
|
||||||
|
|
||||||
|
|
||||||
|
include /usr/share/rhts/lib/rhts-make.include
|
||||||
|
|
||||||
|
$(METADATA): Makefile
|
||||||
|
@echo "Owner: Miroslav Vadkerti <mvadkert@redhat.com>" > $(METADATA)
|
||||||
|
@echo "Name: $(TEST)" >> $(METADATA)
|
||||||
|
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||||
|
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||||
|
@echo "Description: This test groups small sanity and regression tests for util-linux" >> $(METADATA)
|
||||||
|
@echo "Type: Sanity" >> $(METADATA)
|
||||||
|
@echo "TestTime: 10m" >> $(METADATA)
|
||||||
|
@echo "RunFor: util-linux" >> $(METADATA)
|
||||||
|
@echo "Requires: util-linux util-linux-user" >> $(METADATA)
|
||||||
|
@echo "Priority: Normal" >> $(METADATA)
|
||||||
|
@echo "License: GPLv2" >> $(METADATA)
|
||||||
|
@echo "Confidential: no" >> $(METADATA)
|
||||||
|
@echo "Destructive: no" >> $(METADATA)
|
||||||
|
@echo "Releases: -RHEL3 -RHEL4 -RHEL5Server -RHEL5Client -RHEL6" >> $(METADATA)
|
||||||
|
|
||||||
|
rhts-lint $(METADATA)
|
||||||
3
tests/various/PURPOSE
Normal file
3
tests/various/PURPOSE
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
PURPOSE of /CoreOS/util-linux/various
|
||||||
|
Description: This test groups small sanity and regression tests for util-linux
|
||||||
|
Author: Miroslav Vadkerti <mvadkert@redhat.com>
|
||||||
13
tests/various/main.fmf
Normal file
13
tests/various/main.fmf
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
summary: This test groups small sanity and regression tests for util-linux
|
||||||
|
description: ''
|
||||||
|
contact: Miroslav Vadkerti <mvadkert@redhat.com>
|
||||||
|
component:
|
||||||
|
- util-linux
|
||||||
|
test: ./runtest.sh
|
||||||
|
framework: beakerlib
|
||||||
|
recommend:
|
||||||
|
- util-linux
|
||||||
|
- util-linux-user
|
||||||
|
duration: 10m
|
||||||
|
extra-summary: /CoreOS/util-linux/Sanity/various
|
||||||
|
extra-task: /CoreOS/util-linux/Sanity/various
|
||||||
51
tests/various/runtest.sh
Executable file
51
tests/various/runtest.sh
Executable file
|
|
@ -0,0 +1,51 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# runtest.sh of /CoreOS/util-linux/various
|
||||||
|
# Description: This test groups small sanity and regression tests for util-linux
|
||||||
|
# Author: Miroslav Vadkerti <mvadkert@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# This copyrighted material is made available to anyone wishing
|
||||||
|
# to use, modify, copy, or redistribute it subject to the terms
|
||||||
|
# and conditions of the GNU General Public License version 2.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be
|
||||||
|
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
# PURPOSE. See the GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public
|
||||||
|
# License along with this program; if not, write to the Free
|
||||||
|
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
# Boston, MA 02110-1301, USA.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
# Include Beaker environment
|
||||||
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
|
PACKAGE="util-linux"
|
||||||
|
|
||||||
|
rlJournalStart
|
||||||
|
rlPhaseStartSetup
|
||||||
|
rlAssertRpm $PACKAGE
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest "return code of chfn should be always 1 in case failure"
|
||||||
|
rlRun "chfn -f a:b" 1
|
||||||
|
rlRun "chfn -o a:b" 1
|
||||||
|
rlRun "chfn -p a:b" 1
|
||||||
|
rlRun "chfn -h a:b" 1
|
||||||
|
rlRun "chfn -x a:b" 1
|
||||||
|
rlRun "chfn -f a -o b -p c -h d unknown-user" 1
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartCleanup
|
||||||
|
rlPhaseEnd
|
||||||
|
rlJournalPrintText
|
||||||
|
rlJournalEnd
|
||||||
|
|
@ -1,103 +0,0 @@
|
||||||
diff -up util-linux-2.19/floppy-0.18/floppyfloppy.c.kzak util-linux-2.19/floppy-0.18/floppyfloppy.c
|
|
||||||
--- util-linux-2.19/floppy-0.18/floppyfloppy.c.kzak 2009-09-24 03:36:33.000000000 +0200
|
|
||||||
+++ util-linux-2.19/floppy-0.18/floppyfloppy.c 2011-03-07 10:40:42.000000000 +0100
|
|
||||||
@@ -271,6 +271,33 @@ static RETSIGTYPE sighandler(int signum)
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* -1=error, 1=true, 0=false */
|
|
||||||
+static int check_generic(const char *dev, int n)
|
|
||||||
+{
|
|
||||||
+ struct floppy_struct param;
|
|
||||||
+ int fd;
|
|
||||||
+
|
|
||||||
+ if ((fd=open(dev, O_RDONLY)) < 0)
|
|
||||||
+ {
|
|
||||||
+ perror(dev);
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ if (ioctl(fd,FDGETPRM,(long) ¶m) < 0)
|
|
||||||
+ {
|
|
||||||
+ perror(dev);
|
|
||||||
+ close(fd);
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ close(fd);
|
|
||||||
+
|
|
||||||
+ if (param.sect==floppy_type[n].sectors &&
|
|
||||||
+ param.head==floppy_type[n].heads &&
|
|
||||||
+ param.track==floppy_type[n].tracks)
|
|
||||||
+ /* generic device uses expected format */
|
|
||||||
+ return 1;
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
|
|
||||||
static int do_format(const char *dev, int fmtnum,
|
|
||||||
int (*fmt_func)(const char *, int), int flags)
|
|
||||||
@@ -282,6 +309,7 @@ static int do_format(const char *dev, in
|
|
||||||
struct format_descr curtrack;
|
|
||||||
int pct;
|
|
||||||
struct stat stat_buf;
|
|
||||||
+ int gen = 0;
|
|
||||||
|
|
||||||
int i, j;
|
|
||||||
char *devname;
|
|
||||||
@@ -304,23 +332,52 @@ static int do_format(const char *dev, in
|
|
||||||
|
|
||||||
strcat(strcpy(devname, dev), floppy_type[fmtnum].dev);
|
|
||||||
|
|
||||||
+ if (stat(devname, &stat_buf)==-1 && errno==ENOENT)
|
|
||||||
+ {
|
|
||||||
+ /* /dev/fd0xxxxx doesn't exist ...try to use generic device
|
|
||||||
+ *
|
|
||||||
+ * Note: we needn't size specific device if the generic device uses
|
|
||||||
+ * right floppy format (FDGETPRM). -- Karel Zak [30/09/2005]
|
|
||||||
+ */
|
|
||||||
+ if ((gen = check_generic(dev, fmtnum))==1) /* true */
|
|
||||||
+ {
|
|
||||||
+ fprintf(stderr, _("WARNING: size specific device %s doesn't exist, using generic device: %s\n"),
|
|
||||||
+ devname, dev);
|
|
||||||
+ strcpy(devname, dev);
|
|
||||||
+ }
|
|
||||||
+ else if (gen==0) /* false */
|
|
||||||
+ {
|
|
||||||
+ fprintf(stderr, _("ERROR: size specific device %1$s doesn't exist. Use \"MAKEDEV %1$s\" and try it again.\n"), devname);
|
|
||||||
+ return (1);
|
|
||||||
+ }
|
|
||||||
+ else /* error -- no floppy medium or device? */
|
|
||||||
+ return(1);
|
|
||||||
+ }
|
|
||||||
fd=open(devname, O_WRONLY);
|
|
||||||
if (fd < 0)
|
|
||||||
{
|
|
||||||
perror(devname);
|
|
||||||
return (1);
|
|
||||||
}
|
|
||||||
-
|
|
||||||
- if (fstat(fd, &stat_buf) ||
|
|
||||||
- !S_ISBLK(stat_buf.st_mode) ||
|
|
||||||
- MINOR_DEV(stat_buf.st_rdev) != fmtnum)
|
|
||||||
+ if (fstat(fd, &stat_buf) < 0)
|
|
||||||
+ {
|
|
||||||
+ perror(devname);
|
|
||||||
+ close(fd);
|
|
||||||
+ return (1);
|
|
||||||
+ }
|
|
||||||
+ if (!S_ISBLK(stat_buf.st_mode))
|
|
||||||
+ {
|
|
||||||
+ fprintf(stderr,_("%s: not a block device\n"), devname);
|
|
||||||
+ close(fd);
|
|
||||||
+ return (1);
|
|
||||||
+ }
|
|
||||||
+ if (gen==0 && MINOR_DEV(stat_buf.st_rdev) != fmtnum)
|
|
||||||
{
|
|
||||||
errno=EINVAL;
|
|
||||||
perror(devname);
|
|
||||||
close(fd);
|
|
||||||
return (1);
|
|
||||||
}
|
|
||||||
-
|
|
||||||
if (ioctl(fd, FDGETPRM, &geo) < 0)
|
|
||||||
{
|
|
||||||
perror(devname);
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
diff -up util-linux-2.19/floppy-0.18/superfloppy.c.kzak util-linux-2.19/floppy-0.18/superfloppy.c
|
|
||||||
--- util-linux-2.19/floppy-0.18/superfloppy.c.kzak 2009-09-23 02:47:26.000000000 +0200
|
|
||||||
+++ util-linux-2.19/floppy-0.18/superfloppy.c 2011-03-07 10:37:20.000000000 +0100
|
|
||||||
@@ -13,6 +13,7 @@
|
|
||||||
#include <popt.h>
|
|
||||||
#include <locale.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
+#include <locale.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
diff -up util-linux-2.20-rc1/disk-utils/fdformat.8.orig util-linux-2.20-rc1/disk-utils/fdformat.8
|
|
||||||
--- util-linux-2.20-rc1/disk-utils/fdformat.8.orig 2011-07-20 21:55:23.000000000 +0200
|
|
||||||
+++ util-linux-2.20-rc1/disk-utils/fdformat.8 2011-07-29 21:08:57.558601033 +0200
|
|
||||||
@@ -43,6 +43,11 @@ when a non-standard format is being used
|
|
||||||
autodetected earlier. In this case, use
|
|
||||||
.BR setfdprm (8)
|
|
||||||
to load the disk parameters.
|
|
||||||
+
|
|
||||||
+For ATAPI IDE floppy driver (also known as LS-120 drives or "Superdisk"
|
|
||||||
+drives) you have to use the
|
|
||||||
+.BR floppy (8).
|
|
||||||
+
|
|
||||||
.SH OPTIONS
|
|
||||||
.TP
|
|
||||||
\fB\-n\fR, \fB\-\-no\-verify\fR
|
|
||||||
@@ -58,7 +63,8 @@ Display help and exit.
|
|
||||||
.BR fd (4),
|
|
||||||
.BR setfdprm (8),
|
|
||||||
.BR mkfs (8),
|
|
||||||
-.BR emkfs (8)
|
|
||||||
+.BR emkfs (8),
|
|
||||||
+.BR floppy (8)
|
|
||||||
.SH AUTHOR
|
|
||||||
Werner Almesberger (almesber@nessie.cs.id.ethz.ch)
|
|
||||||
.SH AVAILABILITY
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
diff -up util-linux-2.21-rc1/sys-utils/ipcs.c.kzak util-linux-2.21-rc1/sys-utils/ipcs.c
|
|
||||||
--- util-linux-2.21-rc1/sys-utils/ipcs.c.kzak 2012-01-19 13:31:26.328579820 +0100
|
|
||||||
+++ util-linux-2.21-rc1/sys-utils/ipcs.c 2012-01-19 13:33:40.968066006 +0100
|
|
||||||
@@ -262,6 +262,27 @@ static void print_perms (int id, struct
|
|
||||||
printf(" %-10u\n", ipcp->gid);
|
|
||||||
}
|
|
||||||
|
|
||||||
+static unsigned long long
|
|
||||||
+shminfo_from_proc(const char *name, unsigned long def)
|
|
||||||
+{
|
|
||||||
+ char path[256];
|
|
||||||
+ char buf[64];
|
|
||||||
+ FILE *f;
|
|
||||||
+ unsigned long long res = def;
|
|
||||||
+
|
|
||||||
+ if (!name)
|
|
||||||
+ return res;
|
|
||||||
+
|
|
||||||
+ snprintf(path, sizeof(path), "/proc/sys/kernel/%s", name);
|
|
||||||
+
|
|
||||||
+ if (!(f = fopen(path, "r")))
|
|
||||||
+ return res;
|
|
||||||
+ if (fgets(buf, sizeof(buf), f))
|
|
||||||
+ res = atoll(buf);
|
|
||||||
+ fclose(f);
|
|
||||||
+ return res;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void do_shm (char format)
|
|
||||||
{
|
|
||||||
int maxid, shmid, id;
|
|
||||||
@@ -286,12 +307,12 @@ void do_shm (char format)
|
|
||||||
* glibc 2.1.3 and all earlier libc's have ints as fields of
|
|
||||||
* struct shminfo; glibc 2.1.91 has unsigned long; ach
|
|
||||||
*/
|
|
||||||
- printf (_("max number of segments = %lu\n"),
|
|
||||||
- (unsigned long) shminfo.shmmni);
|
|
||||||
- printf (_("max seg size (kbytes) = %lu\n"),
|
|
||||||
- (unsigned long) (shminfo.shmmax >> 10));
|
|
||||||
+ printf (_("max number of segments = %llu\n"),
|
|
||||||
+ shminfo_from_proc("shmmni", shminfo.shmmni));
|
|
||||||
+ printf (_("max seg size (kbytes) = %llu\n"),
|
|
||||||
+ (shminfo_from_proc("shmmax", shminfo.shmmax) >> 10));
|
|
||||||
printf (_("max total shared memory (kbytes) = %llu\n"),
|
|
||||||
- getpagesize() / 1024 * (unsigned long long) shminfo.shmall);
|
|
||||||
+ getpagesize() / 1024 * shminfo_from_proc("shmall", shminfo.shmall));
|
|
||||||
printf (_("min seg size (bytes) = %lu\n"),
|
|
||||||
(unsigned long) shminfo.shmmin);
|
|
||||||
return;
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
#
|
|
||||||
# Enter raw device bindings here.
|
|
||||||
#
|
|
||||||
# An example would be:
|
|
||||||
# ACTION=="add", KERNEL=="sda", RUN+="/usr/bin/raw /dev/raw/raw1 %N"
|
|
||||||
# to bind /dev/raw/raw1 to /dev/sda, or
|
|
||||||
# ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="1", RUN+="/usr/bin/raw /dev/raw/raw2 %M %m"
|
|
||||||
# to bind /dev/raw/raw2 to the device with major 8, minor 1.
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#%PAM-1.0
|
#%PAM-1.0
|
||||||
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
|
|
||||||
auth substack system-auth
|
auth substack system-auth
|
||||||
auth include postlogin
|
auth include postlogin
|
||||||
account required pam_nologin.so
|
account required pam_nologin.so
|
||||||
|
|
@ -8,7 +7,6 @@ password include system-auth
|
||||||
# pam_selinux.so close should be the first session rule
|
# pam_selinux.so close should be the first session rule
|
||||||
session required pam_selinux.so close
|
session required pam_selinux.so close
|
||||||
session required pam_loginuid.so
|
session required pam_loginuid.so
|
||||||
session optional pam_console.so
|
|
||||||
# pam_selinux.so open should only be followed by sessions to be executed in the user context
|
# pam_selinux.so open should only be followed by sessions to be executed in the user context
|
||||||
session required pam_selinux.so open
|
session required pam_selinux.so open
|
||||||
session required pam_namespace.so
|
session required pam_namespace.so
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
diff -up util-linux-2.21-rc1/login-utils/login.c.kzak util-linux-2.21-rc1/login-utils/login.c
|
|
||||||
--- util-linux-2.21-rc1/login-utils/login.c.kzak 2012-01-19 13:19:54.886299587 +0100
|
|
||||||
+++ util-linux-2.21-rc1/login-utils/login.c 2012-01-19 13:20:40.853451212 +0100
|
|
||||||
@@ -499,7 +499,7 @@ static void log_lastlog(struct login_con
|
|
||||||
if (!cxt->pwd)
|
|
||||||
return;
|
|
||||||
|
|
||||||
- fd = open(_PATH_LASTLOG, O_RDWR, 0);
|
|
||||||
+ fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0);
|
|
||||||
if (fd < 0)
|
|
||||||
return;
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#%PAM-1.0
|
#%PAM-1.0
|
||||||
auth required pam_securetty.so
|
|
||||||
auth substack password-auth
|
auth substack password-auth
|
||||||
auth include postlogin
|
auth include postlogin
|
||||||
account required pam_nologin.so
|
account required pam_nologin.so
|
||||||
|
|
|
||||||
5
util-linux-runuser-l.pamd
Normal file
5
util-linux-runuser-l.pamd
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
#%PAM-1.0
|
||||||
|
auth include runuser
|
||||||
|
session optional pam_keyinit.so force revoke
|
||||||
|
-session optional pam_systemd.so
|
||||||
|
session include runuser
|
||||||
5
util-linux-runuser.pamd
Normal file
5
util-linux-runuser.pamd
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
#%PAM-1.0
|
||||||
|
auth sufficient pam_rootok.so
|
||||||
|
session optional pam_keyinit.so revoke
|
||||||
|
session required pam_limits.so
|
||||||
|
session required pam_unix.so
|
||||||
6
util-linux-su-l.pamd
Normal file
6
util-linux-su-l.pamd
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#%PAM-1.0
|
||||||
|
auth include su
|
||||||
|
account include su
|
||||||
|
password include su
|
||||||
|
session optional pam_keyinit.so force revoke
|
||||||
|
session include su
|
||||||
15
util-linux-su.pamd
Normal file
15
util-linux-su.pamd
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
#%PAM-1.0
|
||||||
|
auth required pam_env.so
|
||||||
|
auth sufficient pam_rootok.so
|
||||||
|
# Uncomment the following line to implicitly trust users in the "wheel" group.
|
||||||
|
#auth sufficient pam_wheel.so trust use_uid
|
||||||
|
# Uncomment the following line to require a user to be in the "wheel" group.
|
||||||
|
#auth required pam_wheel.so use_uid
|
||||||
|
auth substack system-auth
|
||||||
|
auth include postlogin
|
||||||
|
account sufficient pam_succeed_if.so uid = 0 use_uid quiet
|
||||||
|
account include system-auth
|
||||||
|
password include system-auth
|
||||||
|
session include system-auth
|
||||||
|
session include postlogin
|
||||||
|
session optional pam_xauth.so
|
||||||
2701
util-linux.spec
2701
util-linux.spec
File diff suppressed because it is too large
Load diff
1
uuidd-tmpfiles.conf
Normal file
1
uuidd-tmpfiles.conf
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
d /run/uuidd 2775 uuidd uuidd
|
||||||
Loading…
Add table
Add a link
Reference in a new issue