[PC-BSD Commits] r18154 - in pcbsd/current/src-sh/pc-adctl: . krb ldap nss nssldap pam samba
svn at pcbsd.org
svn at pcbsd.org
Mon Aug 6 00:53:19 PDT 2012
Author: johnh
Date: 2012-08-06 07:53:19 +0000 (Mon, 06 Aug 2012)
New Revision: 18154
Modified:
pcbsd/current/src-sh/pc-adctl/Makefile
pcbsd/current/src-sh/pc-adctl/krb/krbconf.c
pcbsd/current/src-sh/pc-adctl/ldap/ldapconf.c
pcbsd/current/src-sh/pc-adctl/nss/nssconf.c
pcbsd/current/src-sh/pc-adctl/nssldap/nssldapconf.c
pcbsd/current/src-sh/pc-adctl/pam/pamconf.c
pcbsd/current/src-sh/pc-adctl/samba/sambaconf.c
Log:
small fixes so that new files can be created if no input file is
specified.
Modified: pcbsd/current/src-sh/pc-adctl/Makefile
===================================================================
--- pcbsd/current/src-sh/pc-adctl/Makefile 2012-08-05 10:32:56 UTC (rev 18153)
+++ pcbsd/current/src-sh/pc-adctl/Makefile 2012-08-06 07:53:19 UTC (rev 18154)
@@ -1,4 +1,4 @@
-SUBDIR=krb nss nssldap pam samba scripts conf rc
+SUBDIR=krb ldap nss nssldap pam samba scripts conf rc
.include <bsd.subdir.mk>
Modified: pcbsd/current/src-sh/pc-adctl/krb/krbconf.c
===================================================================
--- pcbsd/current/src-sh/pc-adctl/krb/krbconf.c 2012-08-05 10:32:56 UTC (rev 18153)
+++ pcbsd/current/src-sh/pc-adctl/krb/krbconf.c 2012-08-06 07:53:19 UTC (rev 18154)
@@ -89,8 +89,6 @@
"\t-m <(+|-|^)section.binding.name=value>\n\n"
);
-
-
exit(1);
}
@@ -1001,6 +999,8 @@
if (infile != NULL)
yyparse();
+ if (yyout == NULL)
+ yyout = stdout;
xfree(&infile);
xfree(&outfile);
Modified: pcbsd/current/src-sh/pc-adctl/ldap/ldapconf.c
===================================================================
--- pcbsd/current/src-sh/pc-adctl/ldap/ldapconf.c 2012-08-05 10:32:56 UTC (rev 18153)
+++ pcbsd/current/src-sh/pc-adctl/ldap/ldapconf.c 2012-08-06 07:53:19 UTC (rev 18154)
@@ -1619,6 +1619,8 @@
if (infile != NULL)
yyparse();
+ if (yyout == NULL)
+ yyout = stdout;
do_modifications();
write_ldap_conf();
Modified: pcbsd/current/src-sh/pc-adctl/nss/nssconf.c
===================================================================
--- pcbsd/current/src-sh/pc-adctl/nss/nssconf.c 2012-08-05 10:32:56 UTC (rev 18153)
+++ pcbsd/current/src-sh/pc-adctl/nss/nssconf.c 2012-08-06 07:53:19 UTC (rev 18154)
@@ -966,7 +966,10 @@
err(EX_NOINPUT, "%s", outfile);
}
- yyparse();
+ if (intfile != NULL)
+ yyparse();
+ if (yyout != NULL)
+ yyout = stdout;
if (do_modifications() < 0)
errx(EX_DATAERR, "parameter error");
@@ -977,8 +980,10 @@
xfree(&outfile);
xfree(&infile);
- fclose(yyout);
- fclose(yyin);
+ if (yyout != NULL)
+ fclose(yyout);
+ if (yyin != NULL)
+ fclose(yyin);
return (0);
}
Modified: pcbsd/current/src-sh/pc-adctl/nssldap/nssldapconf.c
===================================================================
--- pcbsd/current/src-sh/pc-adctl/nssldap/nssldapconf.c 2012-08-05 10:32:56 UTC (rev 18153)
+++ pcbsd/current/src-sh/pc-adctl/nssldap/nssldapconf.c 2012-08-06 07:53:19 UTC (rev 18154)
@@ -354,6 +354,8 @@
if (infile != NULL)
yyparse();
+ if (yyout == NULL)
+ yyout = stdout;
do_modifications();
write_nss_ldap_conf();
Modified: pcbsd/current/src-sh/pc-adctl/pam/pamconf.c
===================================================================
--- pcbsd/current/src-sh/pc-adctl/pam/pamconf.c 2012-08-05 10:32:56 UTC (rev 18153)
+++ pcbsd/current/src-sh/pc-adctl/pam/pamconf.c 2012-08-06 07:53:19 UTC (rev 18154)
@@ -987,7 +987,10 @@
err(EX_NOINPUT, "%s", outfile);
}
- yyparse();
+ if (infile != NULL)
+ yyparse();
+ if (yyout == NULL)
+ yyout = stdout;
do_modifications();
write_pam_file();
@@ -996,8 +999,10 @@
xfree(&outfile);
xfree(&infile);
- fclose(yyout);
- fclose(yyin);
+ if (yyout != NULL)
+ fclose(yyout);
+ if (yyin != NULL)
+ fclose(yyin);
return (0);
}
Modified: pcbsd/current/src-sh/pc-adctl/samba/sambaconf.c
===================================================================
--- pcbsd/current/src-sh/pc-adctl/samba/sambaconf.c 2012-08-05 10:32:56 UTC (rev 18153)
+++ pcbsd/current/src-sh/pc-adctl/samba/sambaconf.c 2012-08-06 07:53:19 UTC (rev 18154)
@@ -422,7 +422,10 @@
err(EX_NOINPUT, "%s", outfile);
}
- yyparse();
+ if (infile != NULL)
+ yyparse();
+ if (yyout == NULL)
+ yyout = stdout;
do_modifications();
write_samba_config();
@@ -431,8 +434,10 @@
xfree(&outfile);
xfree(&infile);
- fclose(yyout);
- fclose(yyin);
+ if (yyout != NULL)
+ fclose(yyout);
+ if (yyin != NULL)
+ fclose(yyin);
return (0);
}
More information about the Commits
mailing list