summaryrefslogtreecommitdiff
path: root/platform.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2014-02-09 16:09:58 +0000
committerColin Watson <cjwatson@debian.org>2014-02-10 02:40:16 +0000
commitb63620615d5c8af09e350608233f69191ad6c275 (patch)
tree6123216785c35d73925aaec0d3c2e3f366edc2b9 /platform.c
parentefe70e315cfcc70e765ebd070e83528a6be6c125 (diff)
Allow harmless group-writability
Allow secure files (~/.ssh/config, ~/.ssh/authorized_keys, etc.) to be group-writable, provided that the group in question contains only the file's owner. Rejected upstream for IMO incorrect reasons (e.g. a misunderstanding about the contents of gr->gr_mem). Given that per-user groups and umask 002 are the default setup in Debian (for good reasons - this makes operating in setgid directories with other groups much easier), we need to permit this by default. Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1060 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=314347 Last-Update: 2013-09-14 Patch-Name: user-group-modes.patch
Diffstat (limited to 'platform.c')
-rw-r--r--platform.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/platform.c b/platform.c
index 4aab9a9cd..f99de7fab 100644
--- a/platform.c
+++ b/platform.c
@@ -196,19 +196,3 @@ platform_krb5_get_principal_name(const char *pw_name)
196 return NULL; 196 return NULL;
197#endif 197#endif
198} 198}
199
200/*
201 * return 1 if the specified uid is a uid that may own a system directory
202 * otherwise 0.
203 */
204int
205platform_sys_dir_uid(uid_t uid)
206{
207 if (uid == 0)
208 return 1;
209#ifdef PLATFORM_SYS_DIR_UID
210 if (uid == PLATFORM_SYS_DIR_UID)
211 return 1;
212#endif
213 return 0;
214}