public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in app-misc/screen/files: 4.0.3-extend-d_termname-ng2.patch
@ 2010-12-08 19:11 Justin Lecher (jlec)
  0 siblings, 0 replies; 4+ messages in thread
From: Justin Lecher (jlec) @ 2010-12-08 19:11 UTC (permalink / raw
  To: gentoo-commits

jlec        10/12/08 19:11:04

  Added:                4.0.3-extend-d_termname-ng2.patch
  Log:
  Support for long user names, #348152
  
  (Portage version: 2.2.0_alpha7/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  app-misc/screen/files/4.0.3-extend-d_termname-ng2.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/screen/files/4.0.3-extend-d_termname-ng2.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/screen/files/4.0.3-extend-d_termname-ng2.patch?rev=1.1&content-type=text/plain

Index: 4.0.3-extend-d_termname-ng2.patch
===================================================================
diff --git a/acls.c b/acls.c
index 0f98df2..670c3aa 100644
--- a/acls.c
+++ b/acls.c
@@ -178,7 +178,7 @@ struct acluser **up;
 #endif
   (*up)->u_Esc = DefaultEsc;
   (*up)->u_MetaEsc = DefaultMetaEsc;
-  strncpy((*up)->u_name, name, 20);
+  strncpy((*up)->u_name, name, 32);
   (*up)->u_password = NULL;
   if (pass)
     (*up)->u_password = SaveStr(pass);
@@ -314,8 +314,8 @@ struct acluser **up;
     return UserAdd(name, pass, up);
   if (!strcmp(name, "nobody"))		/* he remains without password */
     return -1;
-  strncpy((*up)->u_password, pass ? pass : "", 20);
-  (*up)->u_password[20] = '\0';
+  strncpy((*up)->u_password, pass ? pass : "", 32);
+  (*up)->u_password[32] = '\0';
   return 0;
 }
 #endif
diff --git a/acls.h b/acls.h
index c41b714..cdd24d4 100644
--- a/acls.h
+++ b/acls.h
@@ -73,7 +73,7 @@ struct plop
 typedef struct acluser
 {
   struct acluser *u_next;		/* continue the main user list */
-  char u_name[20+1];		/* login name how he showed up */
+  char u_name[32+1];		/* login name how he showed up */
   char *u_password;		/* his password (may be NullStr). */
   int  u_checkpassword;		/* nonzero if this u_password is valid */
   int  u_detachwin;		/* the window where he last detached */
diff --git a/display.h b/display.h
index ef99954..563fcd0 100644
--- a/display.h
+++ b/display.h
@@ -22,6 +22,16 @@
  * $Id: 4.0.3-extend-d_termname-ng2.patch,v 1.1 2010/12/08 19:11:04 jlec Exp $ FAU
  */
 
+#include <limits.h>
+
+#ifndef NAME_MAX
+# ifndef MAXNAMELEN
+#  define NAME_MAX 255
+# else
+#  define NAME_MAX MAXNAMELEN
+# endif
+#endif
+
 #ifdef MAPKEYS
 
 #define KMAP_KEYS (T_OCAPS-T_CAPS)
@@ -85,7 +95,7 @@ struct display
   struct win *d_other;		/* pointer to other window */
   int   d_nonblock;		/* -1 don't block if obufmax reached */
 				/* >0: block after nonblock secs */
-  char  d_termname[20 + 1];	/* $TERM */
+  char  d_termname[NAME_MAX + 1]; /* $TERM */
   char	*d_tentry;		/* buffer for tgetstr */
   char	d_tcinited;		/* termcap inited flag */
   int	d_width, d_height;	/* width/height of the screen */
diff --git a/screen.h b/screen.h
index 4f9f354..bcaaaf6 100644
--- a/screen.h
+++ b/screen.h
@@ -43,6 +43,15 @@
 #include "comm.h"
 #include "layer.h"
 #include "term.h"
+#include <limits.h>
+
+#ifndef NAME_MAX
+# ifndef MAXNAMELEN
+#  define NAME_MAX 255
+# else
+#  define NAME_MAX MAXNAMELEN
+# endif
+#endif
 
 
 #ifdef DEBUG
@@ -195,26 +204,26 @@ struct msg
       create;
       struct
 	{
-	  char auser[20 + 1];	/* username */
+	  char auser[NAME_MAX + 1];	/* username */
 	  int apid;		/* pid of frontend */
 	  int adaptflag;	/* adapt window size? */
 	  int lines, columns;	/* display size */
 	  char preselect[20];
 	  int esc;		/* his new escape character unless -1 */
 	  int meta_esc;		/* his new meta esc character unless -1 */
-	  char envterm[20 + 1];	/* terminal type */
+	  char envterm[NAME_MAX + 1];	/* terminal type */
 	  int encoding;		/* encoding of display */
 	}
       attach;
       struct 
 	{
-	  char duser[20 + 1];	/* username */
+	  char duser[NAME_MAX + 1];	/* username */
 	  int dpid;		/* pid of frontend */
 	}
       detach;
       struct 
 	{
-	  char auser[20 + 1];	/* username */
+	  char auser[NAME_MAX + 1];	/* username */
 	  int nargs;
 	  char cmd[MAXPATHLEN];	/* command */
 	  int apid;		/* pid of frontend */
diff --git a/socket.c b/socket.c
index 62a73af..1cc9c27 100644
--- a/socket.c
+++ b/socket.c
@@ -45,6 +45,16 @@
 
 #include "extern.h"
 
+#include <limits.h>
+
+#ifndef NAME_MAX
+# ifndef MAXNAMELEN
+#  define NAME_MAX 255
+# else
+#  define NAME_MAX MAXNAMELEN
+# endif
+#endif
+
 static int   CheckPid __P((int));
 static void  ExecCreate __P((struct msg *));
 static void  DoCommandMsg __P((struct msg *));
@@ -1248,7 +1258,7 @@ static void PasswordProcessInput __P((char *, int));
 
 struct pwdata {
   int l;
-  char buf[20 + 1];
+  char buf[NAME_MAX + 1];
   struct msg m;
 };
 






^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-misc/screen/files: 4.0.3-extend-d_termname-ng2.patch
@ 2010-12-08 21:28 Justin Lecher (jlec)
  0 siblings, 0 replies; 4+ messages in thread
From: Justin Lecher (jlec) @ 2010-12-08 21:28 UTC (permalink / raw
  To: gentoo-commits

jlec        10/12/08 21:28:15

  Modified:             4.0.3-extend-d_termname-ng2.patch
  Log:
  Fixed NAME LENGTH Patch
  
  (Portage version: 2.2.0_alpha7/cvs/Linux x86_64)

Revision  Changes    Path
1.2                  app-misc/screen/files/4.0.3-extend-d_termname-ng2.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/screen/files/4.0.3-extend-d_termname-ng2.patch?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/screen/files/4.0.3-extend-d_termname-ng2.patch?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/screen/files/4.0.3-extend-d_termname-ng2.patch?r1=1.1&r2=1.2

Index: 4.0.3-extend-d_termname-ng2.patch
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-misc/screen/files/4.0.3-extend-d_termname-ng2.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 4.0.3-extend-d_termname-ng2.patch	8 Dec 2010 19:11:04 -0000	1.1
+++ 4.0.3-extend-d_termname-ng2.patch	8 Dec 2010 21:28:15 -0000	1.2
@@ -1,5 +1,5 @@
 diff --git a/acls.c b/acls.c
-index 0f98df2..670c3aa 100644
+index 0f98df2..5f26d70 100644
 --- a/acls.c
 +++ b/acls.c
 @@ -178,7 +178,7 @@ struct acluser **up;
@@ -7,7 +7,7 @@
    (*up)->u_Esc = DefaultEsc;
    (*up)->u_MetaEsc = DefaultMetaEsc;
 -  strncpy((*up)->u_name, name, 20);
-+  strncpy((*up)->u_name, name, 32);
++  strncpy((*up)->u_name, name, MAXSTR);
    (*up)->u_password = NULL;
    if (pass)
      (*up)->u_password = SaveStr(pass);
@@ -17,21 +17,38 @@
      return -1;
 -  strncpy((*up)->u_password, pass ? pass : "", 20);
 -  (*up)->u_password[20] = '\0';
-+  strncpy((*up)->u_password, pass ? pass : "", 32);
-+  (*up)->u_password[32] = '\0';
++  strncpy((*up)->u_password, pass ? pass : "", MAXSTR);
++  (*up)->u_password[MAXSTR] = '\0';
    return 0;
  }
  #endif
 diff --git a/acls.h b/acls.h
-index c41b714..cdd24d4 100644
+index c41b714..7f20f55 100644
 --- a/acls.h
 +++ b/acls.h
-@@ -73,7 +73,7 @@ struct plop
+@@ -36,6 +36,16 @@
+ #define ACLBYTE(data, w)   ((data)[(w) >> 3])
+ #define ACLBIT(w)   (0x80 >> ((w) & 7))
+ 
++#include <limits.h>
++
++#ifndef NAME_MAX
++# ifndef MAXNAMELEN
++#  define NAME_MAX 255
++# else
++#  define NAME_MAX MAXNAMELEN
++# endif
++#endif
++
+ typedef unsigned char * AclBits;
+ 
+ /*
+@@ -73,7 +83,7 @@ struct plop
  typedef struct acluser
  {
    struct acluser *u_next;		/* continue the main user list */
 -  char u_name[20+1];		/* login name how he showed up */
-+  char u_name[32+1];		/* login name how he showed up */
++  char u_name[NAME_MAX+1];		/* login name how he showed up */
    char *u_password;		/* his password (may be NullStr). */
    int  u_checkpassword;		/* nonzero if this u_password is valid */
    int  u_detachwin;		/* the window where he last detached */
@@ -40,7 +57,7 @@
 --- a/display.h
 +++ b/display.h
 @@ -22,6 +22,16 @@
-  * $Id: 4.0.3-extend-d_termname-ng2.patch,v 1.1 2010/12/08 19:11:04 jlec Exp $ FAU
+  * $Id: 4.0.3-extend-d_termname-ng2.patch,v 1.2 2010/12/08 21:28:15 jlec Exp $ FAU
   */
  
 +#include <limits.h>
@@ -65,6 +82,44 @@
    char	*d_tentry;		/* buffer for tgetstr */
    char	d_tcinited;		/* termcap inited flag */
    int	d_width, d_height;	/* width/height of the screen */
+diff --git a/screen.c b/screen.c
+index 70741df..6f45b60 100644
+--- a/screen.c
++++ b/screen.c
+@@ -106,6 +106,16 @@ FILE *dfp;
+ #endif
+ 
+ 
++#include <limits.h>
++
++#ifndef NAME_MAX
++# ifndef MAXNAMELEN
++#  define NAME_MAX 255
++# else
++#  define NAME_MAX MAXNAMELEN
++# endif
++#endif
++
+ extern char Term[], screenterm[], **environ, Termcap[];
+ int force_vt = 1;
+ int VBellWait, MsgWait, MsgMinWait, SilenceWait;
+@@ -877,13 +887,13 @@ char **av;
+ 
+   if (home == 0 || *home == '\0')
+     home = ppp->pw_dir;
+-  if (strlen(LoginName) > 20)
++  if (strlen(LoginName) > NAME_MAX)
+     Panic(0, "LoginName too long - sorry.");
+ #ifdef MULTIUSER
+-  if (multi && strlen(multi) > 20)
++  if (multi && strlen(multi) > NAME_MAX)
+     Panic(0, "Screen owner name too long - sorry.");
+ #endif
+-  if (strlen(home) > MAXPATHLEN - 25)
++  if (strlen(home) > MAXPATHLEN - NAME_MAX)
+     Panic(0, "$HOME too long - sorry.");
+ 
+   attach_tty = "";
 diff --git a/screen.h b/screen.h
 index 4f9f354..bcaaaf6 100644
 --- a/screen.h






^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-misc/screen/files: 4.0.3-extend-d_termname-ng2.patch
@ 2014-09-26 19:55 Ian Stakenvicius (axs)
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Stakenvicius (axs) @ 2014-09-26 19:55 UTC (permalink / raw
  To: gentoo-commits

axs         14/09/26 19:55:53

  Removed:              4.0.3-extend-d_termname-ng2.patch
  Log:
  dropping file temporarily to adjust sticky options


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-misc/screen/files: 4.0.3-extend-d_termname-ng2.patch
@ 2014-09-26 19:56 Ian Stakenvicius (axs)
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Stakenvicius (axs) @ 2014-09-26 19:56 UTC (permalink / raw
  To: gentoo-commits

axs         14/09/26 19:56:10

  Added:                4.0.3-extend-d_termname-ng2.patch
  Log:
  fixed cvs sticky options on file(s) that should not have cvs keyword expansion
  
  (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 2B6559ED)

Revision  Changes    Path
1.4                  app-misc/screen/files/4.0.3-extend-d_termname-ng2.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/screen/files/4.0.3-extend-d_termname-ng2.patch?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/screen/files/4.0.3-extend-d_termname-ng2.patch?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/screen/files/4.0.3-extend-d_termname-ng2.patch?r1=1.3&r2=1.4






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-26 19:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-26 19:55 [gentoo-commits] gentoo-x86 commit in app-misc/screen/files: 4.0.3-extend-d_termname-ng2.patch Ian Stakenvicius (axs)
  -- strict thread matches above, loose matches on Subject: below --
2014-09-26 19:56 Ian Stakenvicius (axs)
2010-12-08 21:28 Justin Lecher (jlec)
2010-12-08 19:11 Justin Lecher (jlec)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox