A very little Display Manager and an obstacle
Moderator: Developer
Re: A very little Display Manager and an obstacle
also,, for clarity: strlen("12345"); will return 5 but to store that string you will need at least 6 bytes: --> [1] [2] [3] [4] [5] [\0]
Re: A very little Display Manager and an obstacle
Ok. Now it's clear! Thank you
Re: A very little Display Manager and an obstacle
Just to close the topic: despite my time is like gold for me nowadays, I managed to make my little Display Manager "EasyDM" check users' password in FreeBSD too! Through a more POSIX way without the "shadow" library, that is a linuxism.
I fixed bug #1: password check in *BSD systems not working.
Moreover, I banned sprintf() from my little home-made DM, to use snprintf() instead
Thank you ASX! I have learnt a lot in forums like this one...
If you are curious, here is my toy:
https://sites.google.com/site/vaisarger ... 0.2.tar.gz
I fixed bug #1: password check in *BSD systems not working.
Moreover, I banned sprintf() from my little home-made DM, to use snprintf() instead
Code: Select all
#define _XOPEN_SOURCE
#include <syslog.h>
#include <unistd.h>
#include <shadow.h>
main(int argc, char *argv[])
{
char parola_da_cryptare[100];
char utente[100];
struct spwd * dati_da_etc_passwd ;
char *puntatore_a_parola_da_cryptare ;
snprintf(parola_da_cryptare,sizeof(parola_da_cryptare),"%s",argv[1]);
snprintf(utente,sizeof(utente),"%s",argv[2]);
dati_da_etc_passwd=getspnam(utente);
puntatore_a_parola_da_cryptare=crypt(parola_da_cryptare,dati_da_etc_passwd->sp_pwdp) ;
If you are curious, here is my toy:
https://sites.google.com/site/vaisarger ... 0.2.tar.gz
Re: A very little Display Manager and an obstacle
Thanks for sharing you work, I will take a look soon.
Btw, the image is not accessible for me ... may be because I'm not logged on google ...
Btw, the image is not accessible for me ... may be because I'm not logged on google ...
I will look at the real thing403. That’s an error.
Your client does not have permission to get URL