Recent Articles

Basic DNS: PTR Records and Why You Care
A PTR record is what lets someone do a "reverse" DNS lookup - that is, they have your IP address and want to know what your host/domain is. At any Unix/Linux command line, you can use "dig -x" to do a reverse lookup

Hardening your Kernel with OpenWall
I read about this in Hardening Linux by James Turnbull. The patch that most interested me was to prevent executable code from running in the stack. That won't prevent all buffer overflow attacks, but it can stop some of them.

Understanding PAM
PAM is the Pluggable Authentication Module, invented by Sun. It's a beautiful concept, but it can be confusing and even intimidating at first. We're going to look at it on a RedHat system, but other Linuxes will be similar - some details may vary...


05.10.05

Getconf

By A.P. Lawrence

"getconf" returns the value of certain system variables. According to the man page (which you may not have on your system) it queries system configuration variables which are either:

system_var

     A system configuration variable, as defined by sysconf(3) or
     confstr(3).

path_var

     A system configuration variable as defined by pathconf(3). This
     must be used with a pathname.


Unlike some implementations, the Linux version won't spit out all the variables it knows about with a "-a" or whatever. You have to either know what you want to know more about, or visit the other man pages (sysconf, confstr, pathconf) to discover your choices.

See How Your Web Host Rates - Free Unbiased Reviews
We can assist you in finding or upgrading to a professional web hosting company

Not all that you'll find in the man pages will work though, and there seems to be a cavalier attitude toward the importance of leading underscores. For example, "man confstr" tells us about _CS_PATH, which tells us where to look for POSIX utilities. So we ask "getconf":

# getconf _CS_PATH
getconf: Unrecognized variable `_CS_PATH'
# getconf CS_PATH
/bin:/usr/bin
But it's the other way around for _POSIX_LINK_MAX

# getconf _POSIX_LINK_MAX `pwd`
32000
# getconf POSIX_LINK_MAX `pwd`
getconf: Unrecognized variable `POSIX_LINK_MAX'


A "strings" of "getconf" reveals a lot of things with leading underscores, and a lot without. No doubt this all makes perfect sense to the author or kernel programmers who are probably more intimate with these variables than I. A strings that is then passed to "grep MAX" reveals a few candidates you might find useful now and then.

*Originally published at APLawrence.com


About the Author:
A.P. Lawrence provides SCO Unix and Linux consulting services http://www.pcunix.com

About UnixProNews
UnixProNews is a collection of news and commentary designed to keep you in step with the ever evolving landscape of Unix environments. News and Advice for Unix Professionals

UnixProNews is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
DatabaseProNews.com SQLProNews.com
ITcertificationNews.com SysAdminNews.com
LinuxProNews.com WirelessProNews.com
CProgrammingTrends.com ITCertificationNews.com



-- UnixProNews is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
2005 iEntry, Inc. All Rights Reserved Privacy Policy Legal

archives | advertising info | news headlines | free newsletters | comments/feedback | submit article

News and Advice for Unix Professionals UnixProNews News Archives About Us Feedback UnixProNews Home Page About Article Archive News Downloads WebProWorld Forums Jayde iEntry Advertise Contact