about summary refs log tree commit diff
path: root/support/namespace.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-01-31 18:49:58 +0100
committerFlorian Weimer <fweimer@redhat.com>2019-01-31 18:49:58 +0100
commit2bac7daa58da1a313bd452369b0508b31e146637 (patch)
treecb26cc3d34519adb5110c443400ff47b3c3cc00b /support/namespace.h
parentde44ab67aa4eec369deea828733567c35a0611c0 (diff)
downloadglibc-2bac7daa58da1a313bd452369b0508b31e146637.tar.gz
glibc-2bac7daa58da1a313bd452369b0508b31e146637.tar.xz
glibc-2bac7daa58da1a313bd452369b0508b31e146637.zip
nss_files: Fix /etc/aliases null pointer dereference [BZ #24059]
If /etc/aliases ends with a continuation line (a line that starts
with whitespace) which does not have a trailing newline character,
the file parser would crash due to a null pointer dereference.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'support/namespace.h')
-rw-r--r--support/namespace.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/support/namespace.h b/support/namespace.h
index f93754934f..4770cf9e90 100644
--- a/support/namespace.h
+++ b/support/namespace.h
@@ -74,6 +74,7 @@ struct support_chroot_configuration
   const char *resolv_conf;      /* /etc/resolv.conf.  */
   const char *hosts;            /* /etc/hosts.  */
   const char *host_conf;        /* /etc/host.conf.  */
+  const char *aliases;          /* /etc/aliases.  */
 };
 
 /* The result of the creation of a chroot.  */
@@ -90,6 +91,7 @@ struct support_chroot
   char *path_resolv_conf;       /* /etc/resolv.conf.  */
   char *path_hosts;             /* /etc/hosts.  */
   char *path_host_conf;         /* /etc/host.conf.  */
+  char *path_aliases;           /* /etc/aliases.  */
 };
 
 /* Create a chroot environment.  The returned data should be freed