X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fconf.c;h=01ec3c09510ae18324900d4fd3651ea63865b401;hp=98a2c1d790f63eadeda6dcd2073046a4407055ec;hb=e84000f7b8b8fb8ae29f53f66dea488f904e0838;hpb=a93247d32f79d4b354c4a9e15bf05d787610eb2c diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c index 98a2c1d7..01ec3c09 100644 --- a/src/ngircd/conf.c +++ b/src/ngircd/conf.c @@ -419,6 +419,7 @@ Conf_Test( void ) #ifdef PAM printf(" PAM = %s\n", yesno_to_str(Conf_PAM)); printf(" PAMIsOptional = %s\n", yesno_to_str(Conf_PAMIsOptional)); + printf(" PAMServiceName = %s\n", Conf_PAMServiceName); #endif #ifndef STRICT_RFC printf(" RequireAuthPing = %s\n", yesno_to_str(Conf_AuthPing)); @@ -807,6 +808,7 @@ Set_Defaults(bool InitServers) Conf_PAM = false; #endif Conf_PAMIsOptional = false; + strcpy(Conf_PAMServiceName, "ngircd"); Conf_ScrubCTCP = false; #ifdef SYSLOG #ifdef LOG_LOCAL5 @@ -1833,6 +1835,12 @@ Handle_OPTIONS(const char *File, int Line, char *Var, char *Arg) Conf_PAMIsOptional = Check_ArgIsTrue(Arg); return; } + if (strcasecmp(Var, "PAMServiceName") == 0) { + len = strlcpy(Conf_PAMServiceName, Arg, sizeof(Conf_PAMServiceName)); + if (len >= sizeof(Conf_PAMServiceName)) + Config_Error_TooLong(File, Line, Var); + return; + } if (strcasecmp(Var, "PredefChannelsOnly") == 0) { /* * TODO: This section and support for "PredefChannelsOnly"