samba36: fix segmentation fault when trying to add non-existent users

Based on a patch from НКВД. Closes #12962.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 35610
This commit is contained in:
Jonas Gorski 2013-02-16 11:39:42 +00:00
parent 30ccd13c81
commit c98b12d911
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=samba
PKG_VERSION:=3.6.11
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_URL:=http://ftp.samba.org/pub/samba \
http://ftp.samba.org/pub/samba/old-versions

View File

@ -113,7 +113,7 @@
+ }
+
+ if (!find_passwd_line(fp, user, &p1)) {
+ printf("User %s not found or invalid in /etc/passwd\n");
+ printf("User %s not found or invalid in /etc/passwd\n", user);
+ goto out;
+ }
+