mate-about-me: interact with passwd via /dev/ptmx#383
mate-about-me: interact with passwd via /dev/ptmx#383pyhalov wants to merge 9 commits intomate-desktop:masterfrom
Conversation
There was a problem hiding this comment.
I got these warnings ending in a build error on Debian Unstable:
mate-about-me-password.c: In function ‘spawn_passwd’:
mate-about-me-password.c:193:10: warning: implicit declaration of function ‘ptsname’; did you mean ‘ttyname’? [-Wimplicit-function-declaration]
name = ptsname(pdialog->pty_m);
^~~~~~~
ttyname
mate-about-me-password.c:193:8: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
name = ptsname(pdialog->pty_m);
^
mate-about-me-password.c:195:4: warning: implicit declaration of function ‘strlcpy’; did you mean ‘strncpy’? [-Wimplicit-function-declaration]
strlcpy(slave_name, name, PTY_MAX_NAME);
^~~~~~~
strncpy
mate-about-me-password.c:205:6: warning: implicit declaration of function ‘grantpt’ [-Wimplicit-function-declaration]
if (grantpt(pdialog->pty_m) < 0) {
^~~~~~~
mate-about-me-password.c:210:6: warning: implicit declaration of function ‘unlockpt’; did you mean ‘unlinkat’? [-Wimplicit-function-declaration]
if (unlockpt(pdialog->pty_m) < 0) {
^~~~~~~~
unlinkat
mate-about-me-password.c:232:7: warning: implicit declaration of function ‘ioctl’ [-Wimplicit-function-declaration]
if (ioctl(pdialog->pty_s,TIOCSCTTY, NULL) < 0) {
^~~~~
mate-about-me-password.c:232:28: error: ‘TIOCSCTTY’ undeclared (first use in this function)
if (ioctl(pdialog->pty_s,TIOCSCTTY, NULL) < 0) {
|
@lukefromdc tried to follow linux man pages, however don't have a system to check compilation |
|
Got another build error, this time |
dee8d5c to
c5f7049
Compare
|
Got another build error, maybe from a typo ? |
lukefromdc
left a comment
There was a problem hiding this comment.
With the last change, this now builds and runs on Debian Unstable, and I had no trouble changing a user password and changing it back
|
Note that I don't know enough about the handling of the *name variable set in line 196 and then initialized with |
|
ptsname(3C) on OpenIndiana says: ptsname(3) on Linux says: |
|
OK, that part is probably the same everywhere, good to to |
|
Note, that last change (s/return/exit/) will fail unless #387 is also applied. I was a bit puzzled, why we can't exit() from child on error, when we should (we don't want to run duplicate process). Now we know the reason :) |
|
Any more updates on this? |
No description provided.