pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/30510: xterm utmp_update problem
On Jun 21, 6:41pm, asmodai%in-nomine.org@localhost (Jeroen Ruigrok/asmodai)
wrote:
-- Subject: Re: pkg/30510: xterm utmp_update problem
| The following reply was made to PR pkg/30510; it has been noted by GNATS.
|
| From: Jeroen Ruigrok/asmodai <asmodai%in-nomine.org@localhost>
| To: Thomas Klausner <wiz%NetBSD.org@localhost>
| Cc: gnats-bugs%NetBSD.org@localhost
| Subject: Re: pkg/30510: xterm utmp_update problem
| Date: Tue, 21 Jun 2005 20:40:20 +0200
|
| -On [20050615 15:12], Thomas Klausner (wiz%NetBSD.org@localhost) wrote:
| >Could you please take a look at this one and advise?
|
| It's not a part of xterm nor of X itself.
|
| It's part of NetBSD's sources:
|
| src/libexec/utmp_update/utmp_update.c
|
| 110 (void)snprintf(tty, sizeof(tty), "%s%s", _PATH_DEV, utx->ut_line);
| 111 fd = open(tty, O_RDONLY|O_NONBLOCK, 0);
| 112 if (fd != -1) {
| 113 if (fstat(fd, &st) == -1)
| 114 err(1, "Cannot stat `%s'", tty);
| 115 if (ruid != 0 && st.st_uid != ruid)
| 116 errx(1, "%s: Is not owned by you", tty);
| 117 if (!isatty(fd))
| 118 errx(1, "%s: Not a tty device", tty);
| 119 (void)close(fd);
| 120 if (access(tty, W_OK|R_OK) == -1)
| 121 err(1, "%s", tty);
|
| In xterm I have:
|
| main.c:
|
| 2693 set_owner(char *device, uid_t uid, gid_t gid, mode_t mode)
| 2694 {
| 2695 if (chown(device, uid, gid) < 0) {
| 2696 if (errno != ENOENT
| 2697 && getuid() == 0) {
| 2698 fprintf(stderr, "Cannot chown %s to %ld,%ld: %s\n",
| 2699 device, (long) uid, (long) gid, strerror(errno));
| 2700 }
| 2701 }
| 2702 chmod(device, mode);
| 2703 }
|
| What does your xtermcfg.h all contain after running bmake configure?
xterm should not be running setuid, and the chowning of the slave device
is happening in the kernel.
christos
Home |
Main Index |
Thread Index |
Old Index