pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/shells/rssh Rename log to my_log to avoid conflict wit...
details: https://anonhg.NetBSD.org/pkgsrc/rev/fac90d450c90
branches: trunk
changeset: 610634:fac90d450c90
user: joerg <joerg%pkgsrc.org@localhost>
date: Thu Nov 01 19:30:58 2012 +0000
description:
Rename log to my_log to avoid conflict with libm.
diffstat:
shells/rssh/distinfo | 3 +-
shells/rssh/patches/patch-rsshconf.c | 370 +++++++++++++++++++++++++++++++++++
2 files changed, 372 insertions(+), 1 deletions(-)
diffs (truncated from 387 to 300 lines):
diff -r 49641308cf56 -r fac90d450c90 shells/rssh/distinfo
--- a/shells/rssh/distinfo Thu Nov 01 19:29:20 2012 +0000
+++ b/shells/rssh/distinfo Thu Nov 01 19:30:58 2012 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.5 2010/10/16 09:57:38 adam Exp $
+$NetBSD: distinfo,v 1.6 2012/11/01 19:30:58 joerg Exp $
SHA1 (rssh-2.3.3.tar.gz) = 0a6dd80b5e6059e0db12c9f1276121dd966b610a
RMD160 (rssh-2.3.3.tar.gz) = e9f5c3a8f8cecd6b29c6b85a2672cd22481ef8b5
Size (rssh-2.3.3.tar.gz) = 119510 bytes
SHA1 (patch-aa) = 778908260daf0f73367037bd5a37a6e7c888ac78
SHA1 (patch-ab) = 19a5f7ffe3fef0c6aa17c1611c564c45a802ea96
+SHA1 (patch-rsshconf.c) = a2c2b14bf3619f77cf4e3cbfeaaa4b356d145443
diff -r 49641308cf56 -r fac90d450c90 shells/rssh/patches/patch-rsshconf.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/shells/rssh/patches/patch-rsshconf.c Thu Nov 01 19:30:58 2012 +0000
@@ -0,0 +1,370 @@
+$NetBSD: patch-rsshconf.c,v 1.1 2012/11/01 19:30:58 joerg Exp $
+
+--- rsshconf.c.orig 2012-10-30 19:27:54.000000000 +0000
++++ rsshconf.c
+@@ -78,7 +78,7 @@ const char *keywords[] = {
+ NULL
+ };
+
+-int log=0;
++int my_log=0;
+
+ /* flag to tell config parser to stop processing config file */
+ static bool got_user_config = FALSE;
+@@ -132,11 +132,11 @@ int read_shell_config( ShellOptions_t *o
+ int status = TRUE; /* were all the cfg lines good? */
+ char line[CFG_LINE_LEN + 1]; /* buffer to hold region */
+
+- log = do_log;
++ my_log = do_log;
+ memset(line, 0, CFG_LINE_LEN + 1);
+ cfg_file = fopen(filename, "r");
+ if (!cfg_file) {
+- if (log){
++ if (my_log){
+ log_set_priority(LOG_WARNING);
+ log_msg("config file (%s) missing, using defaults",
+ filename);
+@@ -174,7 +174,7 @@ int process_config_line( ShellOptions_t
+ *newline = '\0';
+ else {
+ /* there is no newline - log the error and find the EOL */
+- if (log){
++ if (my_log){
+ log_set_priority(LOG_ERR);
+ log_msg("line %d: line too long", lineno);
+ }
+@@ -241,12 +241,12 @@ int process_config_line( ShellOptions_t
+ return TRUE;
+ default:
+ /* the keyword is unknown */
+- if (log){
++ if (my_log){
+ log_set_priority(LOG_ERR);
+ log_msg("line %d: syntax error parsing config file",
+ lineno);
+ }
+- if ( keywrd[0] && log )
++ if ( keywrd[0] && my_log )
+ log_msg("unknown keyword: %s", keywrd);
+ return FALSE;
+ }
+@@ -330,7 +330,7 @@ int get_token( const char *str, char *bu
+ /* initialize strings and pointers */
+ memset(buf, 0, buflen);
+ if ( !(copy = strdup(str)) ){
+- if (log){
++ if (my_log){
+ log_set_priority(LOG_ERR);
+ log_msg("OOM error in get_token() (fatal)");
+ }
+@@ -433,11 +433,11 @@ int process_allow_scp( ShellOptions_t *o
+ const int lineno )
+ {
+ if ( !eat_comment(line) ){
+- if (log) log_msg("line %d: syntax error parsing config file",
++ if (my_log) log_msg("line %d: syntax error parsing config file",
+ lineno);
+ return FALSE;
+ }
+- if (log){
++ if (my_log){
+ log_set_priority(LOG_INFO);
+ log_msg("allowing scp to all users");
+ }
+@@ -460,11 +460,11 @@ int process_allow_sftp( ShellOptions_t *
+ int pos;
+
+ if ( !(pos = eat_comment(line)) ){
+- if (log) log_msg("line %d: syntax error parsing config file",
++ if (my_log) log_msg("line %d: syntax error parsing config file",
+ lineno);
+ return FALSE;
+ }
+- if (log){
++ if (my_log){
+ log_set_priority(LOG_INFO);
+ log_msg("allowing sftp to all users");
+ }
+@@ -488,11 +488,11 @@ int process_allow_cvs( ShellOptions_t *o
+ int pos;
+
+ if ( !(pos = eat_comment(line)) ){
+- if (log) log_msg("line %d: syntax error parsing config file",
++ if (my_log) log_msg("line %d: syntax error parsing config file",
+ lineno);
+ return FALSE;
+ }
+- if (log){
++ if (my_log){
+ log_set_priority(LOG_INFO);
+ log_msg("allowing cvs to all users");
+ }
+@@ -516,12 +516,12 @@ int process_allow_rdist( ShellOptions_t
+ int pos;
+
+ if ( !(pos = eat_comment(line)) ){
+- if (log) log_msg("line %d: syntax error parsing config file",
++ if (my_log) log_msg("line %d: syntax error parsing config file",
+ lineno);
+ return FALSE;
+ }
+ log_set_priority(LOG_INFO);
+- if (log){
++ if (my_log){
+ log_msg("allowing rdist to all users");
+ opts->shell_flags |= RSSH_ALLOW_RDIST;
+ }
+@@ -544,11 +544,11 @@ int process_allow_rsync( ShellOptions_t
+ int pos;
+
+ if ( !(pos = eat_comment(line)) ){
+- if (log) log_msg("line %d: syntax error parsing config file",
++ if (my_log) log_msg("line %d: syntax error parsing config file",
+ lineno);
+ return FALSE;
+ }
+- if (log){
++ if (my_log){
+ log_set_priority(LOG_INFO);
+ log_msg("allowing rsync to all users");
+ }
+@@ -573,7 +573,7 @@ int process_chroot_path( ShellOptions_t
+ */
+
+ if ( !(temp = (char *)malloc(CFG_LINE_LEN + 1)) ){
+- if (log) log_msg("fatal error: can't allocate space for chroot path");
++ if (my_log) log_msg("fatal error: can't allocate space for chroot path");
+ exit(1);
+ }
+ /* get_asgn_param() eats trailing comments, so we won't */
+@@ -584,7 +584,7 @@ int process_chroot_path( ShellOptions_t
+
+ /* get rid of any old value for chroot path, assign new one */
+ if ( opts->chroot_path ) free(opts->chroot_path);
+- if (log){
++ if (my_log){
+ log_set_priority(LOG_INFO);
+ log_msg("chrooting all users to %s", temp);
+ }
+@@ -605,7 +605,7 @@ int process_log_facility( ShellOptions_t
+ int pos;
+
+ if ( !(temp = (char *)malloc(CFG_LINE_LEN + 1)) ){
+- if (log){
++ if (my_log){
+ log_set_priority(LOG_ERR);
+ log_msg("fatal error: can't allocate space for log facility");
+ }
+@@ -778,17 +778,17 @@ int process_log_facility( ShellOptions_t
+
+ free(temp);
+ if ( !eat_comment(line + pos) ){
+- if (log) log_msg("line %d: syntax error parsing config file",
++ if (my_log) log_msg("line %d: syntax error parsing config file",
+ lineno);
+ return FALSE;
+ }
+ if ( facname ){
+ log_set_priority(LOG_INFO);
+- if (log) log_msg("setting log facility to %s", facname);
++ if (my_log) log_msg("setting log facility to %s", facname);
+ log_set_facility(fac);
+ return TRUE;
+ }
+- if (log){
++ if (my_log){
+ log_msg("line %d: unknown log facility specified", lineno);
+ log_set_facility(LOG_USER);
+ }
+@@ -804,7 +804,7 @@ int process_umask( ShellOptions_t *opts,
+ int mask; /* umask */
+
+ if ( !(temp = (char *)malloc(CFG_LINE_LEN + 1)) ){
+- if (log){
++ if (my_log){
+ log_set_priority(LOG_ERR);
+ log_msg("fatal error: can't allocate space in process_umask()");
+ }
+@@ -818,7 +818,7 @@ int process_umask( ShellOptions_t *opts,
+
+ /* convert the umask to a number */
+ if ( !validate_umask(temp, &mask) ){
+- if (log){
++ if (my_log){
+ log_set_priority(LOG_WARNING);
+ log_msg("line %d: invalid umask specified, using default 077",
+ lineno);
+@@ -827,7 +827,7 @@ int process_umask( ShellOptions_t *opts,
+ free(temp);
+ return FALSE;
+ }
+- if (log){
++ if (my_log){
+ log_set_priority(LOG_INFO);
+ log_msg("setting umask to %#o", mask);
+ }
+@@ -857,7 +857,7 @@ int process_user( ShellOptions_t *opts,
+
+ /* make space for user options */
+ if ( !(temp = (char *)malloc(CFG_LINE_LEN + 1)) ){
+- if (log) log_msg("fatal error: can't allocate space for user options");
++ if (my_log) log_msg("fatal error: can't allocate space for user options");
+ exit(1);
+ }
+
+@@ -871,7 +871,7 @@ int process_user( ShellOptions_t *opts,
+
+ /* now process individual config bits of temp */
+ if ( !(pos = get_token(temp, user, CFG_LINE_LEN + 1, TRUE, TRUE )) ){
+- if (log){
++ if (my_log){
+ log_set_priority(LOG_ERR);
+ log_msg("syntax error parsing config file, line %d",
+ lineno);
+@@ -888,12 +888,12 @@ int process_user( ShellOptions_t *opts,
+ * user lines we don't care about...
+ */
+ if ( (strcmp(user, username)) ) return TRUE;
+- if (log){
++ if (my_log){
+ log_set_priority(LOG_INFO);
+ log_msg("line %d: configuring user %s", lineno, user);
+ }
+ if ( !(len = eat_colon(temp + pos)) ){
+- if (log) log_msg("syntax error parsing config file: line %d ",
++ if (my_log) log_msg("syntax error parsing config file: line %d ",
+ lineno);
+ return FALSE;
+ }
+@@ -902,7 +902,7 @@ int process_user( ShellOptions_t *opts,
+ /* do the umask, but validate it last, since it's non-fatal */
+ if ( !(len = get_token(temp + pos, mask, CFG_LINE_LEN + 1,
+ TRUE, FALSE)) ){
+- if (log){
++ if (my_log){
+ log_set_priority(LOG_ERR);
+ log_msg("syntax error parsing user umask, line %d", lineno);
+ }
+@@ -912,14 +912,14 @@ int process_user( ShellOptions_t *opts,
+
+ /* do the access bits */
+ if ( !(len = eat_colon(temp + pos)) ){
+- if (log) log_msg("syntax error parsing config file: line %d ",
++ if (my_log) log_msg("syntax error parsing config file: line %d ",
+ lineno);
+ return FALSE;
+ }
+ pos += len;
+ if ( !(len = get_token(temp + pos, axs, CFG_LINE_LEN + 1,
+ TRUE, FALSE)) ){
+- if (log){
++ if (my_log){
+ log_set_priority(LOG_ERR);
+ log_msg("syntax error parsing user access, line %d", lineno);
+ }
+@@ -927,7 +927,7 @@ int process_user( ShellOptions_t *opts,
+ }
+ if ( !validate_access(axs, &allow_sftp, &allow_scp, &allow_cvs,
+ &allow_rdist, &allow_rsync) ){
+- if (log){
++ if (my_log){
+ log_set_priority(LOG_ERR);
+ log_msg("syntax error parsing access bits, line %d", lineno);
+ }
+@@ -939,7 +939,7 @@ int process_user( ShellOptions_t *opts,
+ if ( !(len = eat_colon(temp + pos)) ) goto cleanup;
+ pos += len;
+ if ( !(path = (char *)malloc(CFG_LINE_LEN + 1)) ){
+- if (log) log_msg("fatal error: can't allocate space for chroot path");
++ if (my_log) log_msg("fatal error: can't allocate space for chroot path");
+ exit(1);
+ }
+ if ( !(len = get_token(temp + pos, path, CFG_LINE_LEN + 1,
Home |
Main Index |
Thread Index |
Old Index