/[packages]/cauldron/shadow-utils/current/SOURCES/shadow-4.1.5.1-shadow_perms.patch
ViewVC logotype

Contents of /cauldron/shadow-utils/current/SOURCES/shadow-4.1.5.1-shadow_perms.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 270392 - (show annotations) (download)
Thu Jul 12 14:11:15 2012 UTC (11 years, 8 months ago) by colin
File size: 847 byte(s)
- New version: 4.1.5.1
- Drop outdated local Dutch translation
- Drop binaries we do not want that are shipped elsewhere
- Package manpages from all locales
- Rediff patches
- Drop TCB patch in favour of upstream TCB support now included
- Write patch to fix upstream TCB build problems
- Drop upstream applied patch (groupmod-username)
1 --- shadow-4.1.5.1/lib/commonio.c.shadow_perms 2012-07-12 12:43:09.285419379 +0100
2 +++ shadow-4.1.5.1/lib/commonio.c 2012-07-12 12:43:35.309942373 +0100
3 @@ -50,6 +50,7 @@
4 #endif /* WITH_TCB */
5 #include "prototypes.h"
6 #include "commonio.h"
7 +#include <grp.h>
8
9 /* local function prototypes */
10 static int lrename (const char *, const char *);
11 @@ -913,6 +914,7 @@
12 char buf[1024];
13 int errors = 0;
14 struct stat sb;
15 + struct group *grp;
16
17 if (!db->isopen) {
18 errno = EINVAL;
19 @@ -970,9 +972,12 @@
20 * Default permissions for new [g]shadow files.
21 * (passwd and group always exist...)
22 */
23 - sb.st_mode = 0400;
24 + sb.st_mode = 0440;
25 sb.st_uid = 0;
26 - sb.st_gid = 0;
27 + if ((grp = getgrnam("shadow")) == NULL)
28 + sb.st_gid = 0;
29 + else
30 + sb.st_gid = grp->gr_gid;
31 }
32
33 snprintf (buf, sizeof buf, "%s+", db->filename);

  ViewVC Help
Powered by ViewVC 1.1.30