Making pam_panic_pw cunit ready

This commit is contained in:
2018-09-30 01:37:34 +02:00
부모 09fa4f648f
커밋 d1412beb45
2개의 변경된 파일7개의 추가작업 그리고 6개의 파일을 삭제

파일 보기

@ -21,9 +21,9 @@ LICENSE : GNU-GPLv3
#define _(String) gettext(String)
int writePasswords(char pw[][99]){
int writePasswords(char pw[][99], char* pwfile){
FILE *f = fopen(PPASSFILE, "w");
FILE *f = fopen(pwfile, "w");
if(f == NULL){
fprintf(stderr, _("ERROR opening file!\n"));
return 2;
@ -33,11 +33,12 @@ int writePasswords(char pw[][99]){
fclose(f);
chmod(PPASSFILE, 0644);
chmod(pwfile, 0644);
return 0;
}
#ifndef TEST
int main(void){
@ -105,6 +106,6 @@ int main(void){
/* Save the results. */
return writePasswords(pw);
return writePasswords(pw, PPASSFILE);
}
#endif

파일 보기

@ -5,4 +5,4 @@ DATE : 2018-03-27T02:34:08+02:00
LICENSE : GNU-GPLv3
*/
int writePassword(char pw[][99]);
int writePasswords(char pw[][99], char* pwfile);