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
![Wink ;)](./images/smilies/icon_e_wink.gif)
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... ![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
![Image](https://lh6.googleusercontent.com/uaiNlmEfXVpKO60Ni-Mf9V0yqCFPju1C3vnzJyi-0AEITCvtaEEVCqiVSwwqOlYAXd6eb-KUcUIt_z_yZPcPapOL21ughkVK1-z2L-6ScQdwKqkuxw=w1175)
If you are curious, here is my toy:
https://sites.google.com/site/vaisarger ... 0.2.tar.gz
![Cool 8-)](./images/smilies/icon_cool.gif)
I fixed bug #1: password check in *BSD systems not working.
![Wink ;)](./images/smilies/icon_e_wink.gif)
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) ;
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
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 ...![Wink ;)](./images/smilies/icon_e_wink.gif)
![Smile :)](./images/smilies/icon_e_smile.gif)
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
![Wink ;)](./images/smilies/icon_e_wink.gif)