Mercurial > hg > rlgallery-misc
changeset 69:c2127bc98694
Update the dgamelaunch compatibility patch.
The patch is now to be applied to dgamelaunch revision 6753fd6e.
Maybe I should maintain my own Git branch. But this project already
uses autotools and npm. I don't need any more software that's amazing
in theory but painful to actually work with.
author | John "Elwin" Edwards |
---|---|
date | Sat, 23 Jan 2016 19:04:17 -0500 |
parents | 67bcca6e3cb1 |
children | 277b126877c8 |
files | dgl/rlgwebd-compat.patch |
diffstat | 1 files changed, 17 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/dgl/rlgwebd-compat.patch Sat Jan 16 02:12:50 2016 +0000 +++ b/dgl/rlgwebd-compat.patch Sat Jan 23 19:04:17 2016 -0500 @@ -1,5 +1,5 @@ diff --git a/dgamelaunch.c b/dgamelaunch.c -index fbf6ef5..b52b545 100644 +index a52812d..6107851 100644 --- a/dgamelaunch.c +++ b/dgamelaunch.c @@ -1489,7 +1489,10 @@ int @@ -43,17 +43,21 @@ if (dowrite) writefile (0); -@@ -2053,6 +2076,8 @@ passwordgood (char *cpw) - { +@@ -2054,6 +2077,12 @@ passwordgood (char *cpw) + char *crypted; assert (me != NULL); -+ if (!strncmp (crypt (cpw, me->password), me->password, DGL_PASSWDLEN)) ++ crypted = crypt (cpw, me->password); ++ if (crypted == NULL) ++ return 0; ++ if (!strncmp (crypted, me->password, DGL_PASSWDLEN)) + return 1; - if (!strncmp (crypt (cpw, cpw), me->password, DGL_PASSWDLEN)) - return 1; - if (!strncmp (cpw, me->password, DGL_PASSWDLEN)) ++ + crypted = crypt (cpw, cpw); + if (crypted == NULL) + return 0; diff --git a/dgamelaunch.h b/dgamelaunch.h -index b9ce41c..ca5e11b 100644 +index e298adf..411c7c3 100644 --- a/dgamelaunch.h +++ b/dgamelaunch.h @@ -20,7 +20,7 @@ @@ -66,10 +70,10 @@ #define DGL_MAXWATCHCOLS 10 diff --git a/dgl-common.c b/dgl-common.c -index e5c80bc..fbc4eea 100644 +index 80560b5..94f7b69 100644 --- a/dgl-common.c +++ b/dgl-common.c -@@ -593,7 +593,7 @@ game_read_extra_info(struct dg_game *game, const char *extra_info_file) +@@ -608,7 +608,7 @@ game_read_extra_info(struct dg_game *game, const char *extra_info_file) struct dg_game ** populate_games (int xgame, int *l, struct dg_user *me) { @@ -78,7 +82,7 @@ DIR *pdir; struct dirent *pdirent; struct stat pstat; -@@ -631,13 +631,15 @@ populate_games (int xgame, int *l, struct dg_user *me) +@@ -646,13 +646,15 @@ populate_games (int xgame, int *l, struct dg_user *me) if (!inprog) continue; @@ -95,7 +99,7 @@ { char *ttrecdir = NULL; strncpy(playername, pdirent->d_name, DGL_PLAYERNAMELEN); -@@ -651,6 +653,9 @@ populate_games (int xgame, int *l, struct dg_user *me) +@@ -666,6 +668,9 @@ populate_games (int xgame, int *l, struct dg_user *me) graceful_exit(145); } replacestr++; @@ -105,7 +109,7 @@ ttrecdir = dgl_format_str(game, me, myconfig[game]->ttyrecdir, playername); if (!ttrecdir) continue; -@@ -673,6 +678,8 @@ populate_games (int xgame, int *l, struct dg_user *me) +@@ -688,6 +693,8 @@ populate_games (int xgame, int *l, struct dg_user *me) strlcpy (games[len]->name, pdirent->d_name, strlen (pdirent->d_name) + 1);