From: utzoo!decvax!harpo!npoiv!alice!research!dmr Newsgroups: net.unix-wizards Title: Blood-curdling su and newgrp Article-I.D.: research.270 Posted: Tue Jul 20 18:52:15 1982 Received: Sun Jul 25 02:12:39 1982 Mark Horton's solution to problems he finds with csh deserve some comment. The problems, as I remember them, were 1) that csh is sometimes noisy when executing su, and 2) that the history in the main shell is not transmitted to the su subprocess. The proposed solution was 1) write a program that scribbles on /dev/kmem, and 2) hack the system so that the scribbling would actually do what it was intended to do. The proposed solution is terribly objectionable on a number of accounts. First, and most important, it uses very powerful medicine in the wrong place and for the wrong reason. If csh has bugs or misdesign, fix it or live with it. Don't change the operating system to evade the issue. Second, writing on /dev/kmem is in fact quite dangerous, as well as nonmodular, unclean, and all the other nonbuzzwords. (Renice is not one of the loveliest parts of the Berkeley system) Third, the dangerous, powerful technique is being used to do something that is already quite possible (namely su). The renice command has at least the modest virtue of performing a new function. Fourth, I am dubious about the actual change that was made to the system. (copy p->p_uid to u.u_uid in the wait system call. Can you imagine the amazing comment that must surely be present here?). It is by no means obvious that the change is harmless to the functioning of the system, though possibly it is. Fifth, doing things like this in order to make su quick and easy to use is heading in the wrong direction. If anything, su should be made more clumsy and harder to use, in order to encourage people to arrange user and group IDs in appropriate ways. If you find that you have to spend a lot of time in su, you are doing something wrong. All in all, a thoroughly bad deal. If I were system administrator on his machine, I would change the su password instantly. Dennis Ritchie