Slashdot Mirror


User: Karellen

Karellen's activity in the archive.

Stories
0
Comments
523
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 523

  1. Re:Kludge? on Root 101 - Concept of Root for Newbies · · Score: 1

    Not really.

    At some point, you have to have the `top' user who is able to grant all other users various priveliges, and to change all other users' passwords when they forget theirs. Call that user `root'.

    Once you have that user, it's possible to write a program which, when run as that user, creates a new user with a known password or changes an existing users password to a known value, imbues them with whatever priveliges you _do_ want if it doesn't have them already, changes to _be_ that user(*) and then executes whatever code you actually want to execute.

    However you cut it, you have to have a user with `top' control. If you pretend that that user doesn't exist, you will lull users into a false sense of security when they are running as that user.

    If you make people aware that `root' can do anything, if you tell them to be scared of it, tell them to set up `sudo' and use it as much as possible because otherwise their system will get hosed, then they have a chance.

    If you pretend otherwise, then that's just inviting disaster.

    K.

    (*) You could do this either by a `setuid'-type function, or setting up a program to execute on login and then arranging a login, or a whole bunch of other ways.

  2. Re:Debugging with printfs on Web Programming by printf() · · Score: 1

    That's what cygwin is for. Alternatively, just write your own setlogmask() and syslog() - they're not too complex - a few #defines, setlogmask() sets bits in a static variable, and syslog() writes to the Windows application event log if the logmask is correct. 100 lines of code, tops.

  3. Re:Debugging with printfs on Web Programming by printf() · · Score: 1
    I prefer debugging by syslog(3)

    Most of my web cgi code has a fair amount of syslog calls in it for various conditions, all with appropriate severities.

    On live code, I call
    setlogmask(LOG_MASK(LOG_WARNING) | LOG_MASK(LOG_ERR) | ... | LOG_MASK(LOG_EMERG));
    so that only error conditions (like being unable to contact the backend database) get logged. I then have all the live servers forward their logs to a central server, which emails me (via a tiny script I cooked up) each syslog message with a severity of LOG_WARNING or above it gets. This means I get instant notification of web errors in my inbox, which is really handy.

    But for debugging purposes, I can just comment out the initial call to setlogmask(3) on the test server, and run the program in one window while having
    tail -f /var/log/messages | less
    running in another. As soon as the error pops up, I can check the debug syslog messages in the messages file. To remove them *all*, I just put the one setlogmask() call back.

    Really handy.
  4. GCC's RTL might be a candidate. on Runtimes and Open Source? · · Score: 2, Interesting

    The Gnu Compiler Collection is a set of front ends that all convert the source code you feed them into an intermediate form called RTL (Register Transfer Language) which (as far as I've been able to work out) is a sort of pseudo-assembly language for an idealised CPU with an infinite number of registers and a whole bunch of other generalised rules.

    This RTL is then put through transformations (generic optimisations & stuff) before being sent to a particular GCC back end that generates machine code for a specific CPU from the RTL.

    So - why not save the RTL? It's an IL (Intermediate Language). If you added the ability of GCC back ends to run the code they generate directly, you've got an instant RTL VM.

    Well, according to the docs, it's an internal form, doesn't contain all the program info, and is already partly optimised for specific platforms. (http://gcc.gnu.org/onlinedocs/gccint/Reading-RTL. html), so you could use Trees, but I think they're only used for C and C++ so far.

    But I'm sure there's got to be a mid-point somewhere in GCC that you could create a language->IL and VM/Processor pair out of.

    K.

  5. Re:Quake (I, III & III) has this on Interoperability Between the GUI and the CLI? · · Score: 2

    Wow, they should make a text editor that could do stuff like this too.

    Imagine, being able to go from editing text to, say, a command mode by pressing a key like (or `~' if you really wanted).

    Then you could do stuff like copy whole blocks of code to the clipboard by typing something like `yi{', and paste it with `p'. By adding some extra syntax to this, you could probably have a whole bunch of separate clipboards a couple of keystrokes away.

    More complex commands could be delimited by `:' and , (e.g. to load another file into a new window could be `:new filename').

    A simple extension to this (such as using `:!' to start), and you could enter shell commands as well! Imagine, being able to type `:! ls' from your text editor to get a directory listing without having to go to a separate window!

    And if dismissing the command window to go back to inserting text was just another keystroke away (such as `i', `a', `o', `O', or even something else), imagine the productivity benefits you could get! :)

  6. This is what the Recording Industry WANTS! on Ebay vs. Musician · · Score: 2

    The thing is that the Recording Industry is probably more scared about this that about unauthorised distribution (piracy) of their own music. While unauthorised distribution may deprive them of income (and there is much anecdotal evidence to the opposite effect, that `try before you buy' increases sales), proven easy distribution of independent music makes them obsolete. I wouldn't be at all surprised if they put more pressure to remove independent works than owned works on sites like eBay, to keep up the barriers to entry for the competition.

    And that's basically what this story is about. An indepentent artist, who is being presented with an unacceptibly high barrier to entry to distribute his work to as many people as possible. Which is surely the Recording Industry's main purpose.

  7. Re:What will be the default save format? on Tim Bray on Microsoft Office · · Score: 2

    Don't you mean XML/SGML?

    As TCP/IP (TCP over IP; think 3/5 == three fifths == 3 over 5) is TCP running over IP, and GNU/Linux is the GNU toolchain running over a Linux kernel, surely XML is a document metaformat `running over' the earlier, more complex, SGML document metaformat.

    K.

  8. Re:Security depends on many things. on Windows vs Linux On Security · · Score: 3, Insightful

    Compared to ACLs, the UNIX model of a single administrator with r00t access, and `everyone else', is simple. Very simple. The `setuid on execute' (with root as owner) for small, auditable programs (such as `passwd' and `su') that do simple things to allow people to do things requiring root capabilities (write passwd file, change to another user (including root)) couldn't be made more simple and straightforward unless you tried _really_, _really_ hard.

    And some competent sysadmins still get it wrong on occasion. It's rare, but they can.

    Stopping determined attackers cracking your system is hard, even if you have all the latest patches. The more complex your system gets, the more chances are that you'll miss something.

    The complexity of ACLs? I've seen the API docs(*) for them. That's just nasty. It's _too_ complex IMO for an admin (even a good one) be certain of getting it right all the time. I'll take the simplicity of the UNIX way. I'm more confident of getting it right.

    K.

    *(Well, I've seen the MS ACL API docs, but MS have a habit of creating really shitty APIs, so there may be a better way)

  9. Re:Whiny little bitches on If Programming Languages Could Speak · · Score: 2

    Apart from the One True Programming Language, of course.

    Bite me. :)

  10. Re:Who's fault, another spin on Blind User Sues Southwest Over Web Site, Cites ADA · · Score: 2

    Don't know about you, but I still use links for a lot of web browsing. (It's handy at work, where suits just see a `scary black screen with mostly-grey monospaced text' and assume it's that other `scary black screen with mostly-grey monospaced text' (vim) that I use when I'm actually working. And for the most part, that's fine for me, becuase nearly all the sites I read most (slashdot, the onion, mailing list archives, faqs, rfcs, api documentation, kuro5hin, bbc news, bugzilla, etc...) are text orientated.

    In spite of this `increasingly visual medium', I'll contend that any website that isn't worth reading with a text-based browser probably isn't worth reading with a graphical browser.

    And before you say `But what about pr0n?' - I'll point you at nifty.org, the alt.sex.stories.moderated archive. I prefer it to most visual pr0n sites because the pictures are better! :-p

    K.

  11. Re:Curiously enough... on Music Industry Pays $67M Fine For Price Fixing · · Score: 2

    Think that's stupid?

    What about the CD of the soundtrack to a movie costing more than the DVD of that movie?

    The soundtrack only contains _some_ of the audio in the movie (the background audio at that, no dialog for you), is about half the length, and is `recorded` (pressed, whatever) onto a more mature format with higher overall turnover (more CDs than DVDs are pressed per year) and so will greatly benefit from economies of scale and `recording equipment` depreciation.

    Yet the DVD costs £9.99 (~$15) and the CD soundtrack costs $13.99 (~$20)???

  12. Re:Not 100,000 threads in parallel, just 50. on Running 100,000 Parallel Threads · · Score: 2

    _Need_ the low latency patch? We don't.

    karellen $ uname -a
    Linux foo 2.4.17 #1 Sat Jul 13 12:21:18 GMT 2002 i686 unknown
    karellen $ cat /proc/cpuinfo | grep -E "model|cpu"
    cpu family : 6
    model : 3
    model name : AMD Duron(tm) Processor
    cpu MHz : 757.485
    cpuid level : 1
    karellen $ cat /proc/meminfo | grep MemTotal
    MemTotal: 126732 kB
    karellen $

    So, I'm running 2.4.17 on an AMD 750 with 128MB of RAM. You'll have to take my word that that's a stock 2.4.17, with no patches, but I'm playing a list of .ogg files with xmms, while ripping and ogging a CD in the background, with Mozilla running, and grabbing a mozilla window and moving it around the desktop (with opaque window moving switched on) really quickly for 20 seconds results in - no skipping.

    Yeah, reducing latency will be nice, but as far as I can tell, it's not actually needed for anything to do with the `user experience' at the moment.

    Don't know what you've got running in the background, but it must be pretty hefty.

    K.

  13. Re:Not 100,000 threads in parallel, just 50. on Running 100,000 Parallel Threads · · Score: 5, Informative

    It's not process/thread _creation_ times that make the difference, it's the process/thread _context_switch_ times that really mount up, which is where Linux shines.

    And yes, Linux's process context switches are on a par (possibly faster - can't be bothered to look up benchmarks) with NT's thread context switches.

    K.

  14. Just take simple precautions. on How Serious is Static Electricity? · · Score: 2

    Not working on a commercial production line, the only time I need to worry about ESD is when I'm fiddling with my (or my family's) PC. Or occasionally my PC at work.

    So, just make sure you leave the PC plugged in but switched off at the socket, leaving it earthed, and touch the bare metal of the inside frame before messing with any of the cards. (That includes the cards you're about to get out of their protective bags, as well as the ones already in the PC). Be sure to touch the frame regularly while working, just in case of ES build up, and you should be fine.

    K.

  15. Re:So what? on KDE Gets The Hat · · Score: 2

    Emacs is _not_ an OS, it's a shell.

  16. Re:Thank god for ogg! on New MP3 License Terms Demand $0.75 Per Decoder · · Score: 5, Informative

    You don't want to encode mp3 to ogg; the artifacts that both introduce when multiplied together can be _really_ nasty, much more so than the individual artifacts.

    Re-rip your CD collection from scratch, and encode directly to .ogg - it'll be a better encoding, and no need for an mp3 decoder.

  17. Re:For crying out loud..... on Microsoft Notes Critical Security Holes in Windows, Office · · Score: 2

    Then all we'd hear is "why can't I install this dancing puppy thingy that my stupid ass aunt sent me?"

    And then you hit them _really_ hard with a lart, and shout How many times have we told you to NEVER, EVER run programs that people send you via email? Even programs that have been sent by people you trust?.

    Then you report them to their manager for violating the company's computer AUP.

    I can't believe that if you still have a problem at your company with people running untrusted code, and you're complaining that moving to Linux would cause you to have _more_ administritive headaches?!? Some of your other points, OK. But this one?

    Sheesh.

  18. Re:Follow-through action on Bruce Perens Plans On-Stage DMCA Violation · · Score: 2

    I did boycott the movies.

    After the Jon Johannsen (sp? - it's been a long time since I had to write it down) DeCSS arrests I went from going to the cinema 6(ish) times / month pre Feb 2000 to never in the period from Feb 2000 to Feb 2002.

    After 2 years of not going to the cinema, and patiently explaining to my friends (a lot of whom are geeks and understand the issues) why they shouldn't, they all still were, and I kept reading movie reviews in other places where I figured there'd be some solidarity, and the evil movie corps weren't noticing my absence in the slightest.

    So, what's the fucking point?

    I didn't really miss the movies. But I did miss talking about them. Not being able to participate in the conversations about any movies that had come out recently was really starting to get to me. And there's only so many times you can say "But they're eeeviiil" before you start getting told to shut up (I did stop before then) and give it a break.

    So, I've been back. I watch a few movies at the cinema now and again when some people are planning a big trip, and take part in the conversations again.

    Still haven't bought any DVDs, but know the movie business doesn't give a shit about me and I'm not making a sod of difference.

    Screw you all for supporting them with your dollars. You get what you deserve.

    K.

  19. No conforming C compilers though! on Clockless Computing · · Score: 2

    ...if you can't define CLOCKS_PER_SEC

  20. You are so wrong. on Doom3 and OpenGL2.0 · · Score: 4, Informative

    Get a grip dude. Doom is not evil.

    I have to admit, that is a tragic story and something no-one should ever have to go through.

    That said, it's a fucking computer game. Nothing more, nothing less. It's not a physically addictive chemical. It wasn't created from a pact with the devil, in an attempt to lure people to sinful (suicidal) deaths. It's pixels (blocky ones at that) on a screen, and a pretty limited set of sounds being repeated through a set of (normally pretty crappy) speakers.

    Your friend got addicted to it - well I'm sorry, but don't go blaming anyone else, even the people that made it.

    Your friend started skipping work and playing 18+hours/day? Shit, didn't that clue him into the fact that something was getting a bit fucked up with his priorities and he ought to stop? When I started playing CivIII until 3:00 in the morning and I had to get up at 6:30 for work, I realised that it was time to delete the thing. Do I blame the writers for making such a great game? No. I congratulate them. And then I deleted it. When I realised that I was really _needing_ a drink to get me going some days a while back after I'd started drinking heavily for a month or so after a girlfriend left me, I realised it was time to stop drinking completely for a while and just get over her. Do I blame beer for being a seductive place of solace, or the brewers who made it? No. Do I blame by girlfriend? No. She didn't see a future for us and ended it. What was she supposed to do? Stay in a relationship she didn't like for the sole purpose of not hurting my feelings? Hell no. That's part of being an adult. You realise when your life isn't doing what it should, and sort it out. It's your life, and you gotta take responsibility for it.

    Shit, didn't it occur to _you_ that you oughta talk your friend out of this sort of behaviour? Or force him out of it? Get rid of the source of his fix? Some fucking friend you turned out to be.

    All Doom had to do with your friends unforunate demise was be there.

    It's not `wrong'. It's not `evil'. Neither is it `right' or `good'. It just is. And you or your friend or anyone else on the planet can take it or leave it. What they get out of it is entirely their own responsibility. That's one of the breaks of being an adult in a free country.

    Stop blaming other people for your friend's death. It's not their fault. Get. Over. It.

    K.

  21. Re:Linux FUD on The Ideas Behind Longhorn · · Score: 2

    none of them has had ANY unscheduled downtime in about two years

    How much scheduled downtime have they had, including reboots? How often, for how long and for what reason? (Rebooting to install a kernel patch (service pack), new hardware, or because the power in the building is going down and your UPS can't handle it is OK. Everything else is not.)

    K.

  22. Re:Linux FUD on The Ideas Behind Longhorn · · Score: 2

    10+ things running at any given time? Wow! That is abso-fucking-lutely a-fucking-mazing.

    When you've had a Windows server running for 6 months with an average process count during working hours of over 1000 (one thousand), let me know.

    K.

  23. Re:Software NOT Different on Why (Most) Software is so Bad · · Score: 2

    Hey, I said if _I_ wrote a word processor over the course of 50 years it would be good. I have no control over how good other people's word processors are. I'm sure there are plenty of people out there who used to build lousy fridges too.

    :-)

    Fortunately, my job involves writing code and documentation. For that I don't need a word processor, so I'll probably never scratch that itch and write one. Just give me a nice text editor, and I'll be happy. Fortunately, a quite a few very good text editors already exist, and _are_ a lot better than their original incarnations.

    K.

  24. Re:Software NOT Different on Why (Most) Software is so Bad · · Score: 2

    Software _is_ different.

    If I wrote a word processor, and had between 1950 and now to write it, you better belive the new version would be better than the 50-year old version.

    The problem is that people think that software is software, and that if you can write a word processor, writing a spreadsheet is exactly the same, which is absurd.

    It's like taking a fridge engineer, the best in the business, and telling him:

    "Yes, we like your fridges very much. You're a great engineer. We've heard great things about ovens. Please build us an oven. Oh, and as you've had all this experience with building things, your oven should be better than your fridge".

    "I should warn you, I've never built an oven before."

    "So? you've built a fridge. They involve building stuff don't they? With metal and plastic and insulating material and electricity? Hell, they're even both used for getting food to a certain temperature - it's not like we're asking you to build a bridge or anything (although that's what your next project will be)".

    "Well, there may be some similarities, but there are a load of differences to overcome, most of which I don't know about yet, because I've never tried to build an oven. Materials perform differently under different temperatures, and I've never actually stress-tested them myself over long periods of time in high temperature conditions because I build fridges..."

    "Rubbish. Just get on with it. We'd like a prototype in 2 months, and if it's good enough, we'll replicate it a million times and ship it."

    "But..."

    "And when you're done with that, you can make a start on this 'bridge' project I've read about. Sounds fascinating. As an engineer, I'm sure you'll find it really easy."

  25. Re:McAfee has been doing this since '93 on McAfee Manufactures Virus Threat · · Score: 1

    ...any given sentence must be either true or false, there being no third alternative.

    What a load of crap. Re-phrasing the `mu' jargon file entry, the sentence

    "I have stopped beating my wife"

    can neither be true nor false, because I don't have a wife to beat. It's based on a faulty premise.