Commit Graph

299 Commits

Author SHA1 Message Date
Denis Vlasenko
b5a122b6f9 fix for uclibc-without-shadow.h compilation 2006-12-30 14:46:51 +00:00
Denis Vlasenko
7fa0fcafca fix build without shadow support 2006-12-28 21:33:30 +00:00
Denis Vlasenko
9a44c4f91c bb_xget[pw/gr]nam were horribly misnamed - fixed.
uidgid_get -> get_uidgid, add additional param
(numeric_ok). Make chown use it.
chown: fix "chown user: ...."
install: fix incorrect use of bb_xget[pw/gr]nam
2006-12-28 05:44:47 +00:00
Denis Vlasenko
3ef70d43ad adduser: trivial code movement 2006-12-26 17:37:38 +00:00
Denis Vlasenko
bf0a201008 style fixes
last xcalloc replaced by xzalloc
2006-12-26 10:42:51 +00:00
Denis Vlasenko
e13a537795 su: fix typo: "argv -= optind" should be += 2006-12-23 02:59:06 +00:00
Bernhard Reutner-Fischer
359d7ca0e7 - rename SU_SYSLOG to FEATURE_SU_SYSLOG 2006-12-19 08:55:38 +00:00
Denis Vlasenko
8eb3b391ad passwd: add option to check passwords for weakness 2006-12-19 00:33:53 +00:00
Denis Vlasenko
15b213ef5a su: make /etc/shells check configurable
ash: missing ';'
2006-12-19 00:20:20 +00:00
Denis Vlasenko
9f739445cd inline strcmp(s, "-") [actually macro-ize it for now - gcc is too stupid] 2006-12-16 23:49:13 +00:00
Denis Vlasenko
16c2c700fd passwd: fix indentation 2006-12-12 18:11:58 +00:00
Denis Vlasenko
db2b52425d passwd: added comment 2006-12-12 17:14:56 +00:00
Denis Vlasenko
900406c359 passwd: shrink by ~10 bytes, use PRNG instead of usleep. 2006-12-12 14:38:03 +00:00
Denis Vlasenko
becd8c538c passwd: made smaller by ~130 bytes. size can go negative
if current trend will continue ;)
2006-12-01 21:34:20 +00:00
Denis Vlasenko
4c87d4f242 passwd: micro-optimization 2006-11-30 23:13:59 +00:00
Denis Vlasenko
002526481e passwd: small size optimization. salt generation improved
(really generated different salts even if called back-to-back).
2006-11-30 20:41:28 +00:00
Denis Vlasenko
ab24e18c7a passwd: rework:
* do not make backup copy by copying (just retain old file)
* correctly fall back to /etc/passwd if user is not in shadow
* fix bug with overlong passwd entries
* be permissive on some kinds of failures
* reduce stack usage
* code size: -500 bytes
2006-11-30 16:41:15 +00:00
Bernhard Reutner-Fischer
b8bb27c7ea - save 4 bytes
text    data     bss     dec     hex filename
    764       0      80     844     34c vlock.o.oorig
    760       0      80     840     348 vlock.o
2006-11-30 14:53:51 +00:00
Denis Vlasenko
d9e15f2068 style cleanup: return(a) -> return a, part 2 2006-11-27 16:49:55 +00:00
Denis Vlasenko
d686a045c8 safe_strtoXX interface proved to be a bit unconvenient.
Remove it, introduce saner bb_strtoXX.
Saved ~350 bytes.
2006-11-27 14:43:21 +00:00
Bernhard Reutner-Fischer
8a0a83d503 - minor shrinkage
text    data     bss     dec     hex filename
    773       0      80     853     355 vlock.o.orig
    766       0      80     846     34e vlock.o
2006-11-27 13:58:18 +00:00
Denis Vlasenko
a7b2c41e03 deluser: the same code, but a bit less obfuscated. 2006-11-27 01:04:23 +00:00
Denis Vlasenko
c9bb67787a deluser: size reduction by 60 bytes.
patch from Tito <farmatito@tiscali.it>
2006-11-27 00:54:59 +00:00
Bernhard Reutner-Fischer
7627cc1454 - fix typo 2006-11-22 18:21:08 +00:00
Denis Vlasenko
4a5cf16a36 login: use %s - we know that string is not too long there
ping[6]: use getopt32: smaller (-50 bytes) and handles -c6 correctly
(was requiring '-c 6' with mandatory space)
2006-11-20 00:48:22 +00:00
Denis Vlasenko
89f0b3486d rodata cleanup. "unable to" == "cannot". -300 bytes 2006-11-18 22:04:09 +00:00
Denis Vlasenko
6476cc1089 getty: remove ancient termio support (was using termois anyway) 2006-11-07 01:52:10 +00:00
Denis Vlasenko
9225854144 mostly style fixes 2006-11-01 10:25:35 +00:00
Denis Vlasenko
8c76487f06 login: add big fat comment about SIGINT - prevent
adding/deleting that code again and again
2006-10-31 18:30:56 +00:00
Denis Vlasenko
6ae8079e2d login: re-enable Ctrl-^C before execing shell. 2006-10-31 17:34:44 +00:00
Denis Vlasenko
ddec5af6b0 rename functions to more understandable names 2006-10-26 23:25:17 +00:00
Denis Vlasenko
703aa13ff5 watch: fix warning
getty: fix breakage; fix excessive stack usage
2006-10-23 22:43:02 +00:00
Denis Vlasenko
4e70bf4359 getty: conditionally disable handling of all-caps terminals. 2006-10-23 10:17:34 +00:00
Denis Vlasenko
50e77e1cc1 getty: cleanup part 2 2006-10-23 02:11:22 +00:00
Denis Vlasenko
dce3fde414 getty: cleanup part 1 2006-10-23 02:10:45 +00:00
Denis Vlasenko
e1a0d486e4 message string changes, mostly for consistency, also -32 bytes in .rodata 2006-10-20 13:28:22 +00:00
Denis Vlasenko
c345d8e945 sulogin: add support for $SUSHELL & $sushell 2006-10-14 11:47:02 +00:00
Denis Vlasenko
ea62077b85 add open_read_close() and similar stuff 2006-10-14 02:23:43 +00:00
Denis Vlasenko
1385899416 attempt to regularize atoi mess. 2006-10-08 12:49:22 +00:00
Denis Vlasenko
7d219aab70 build system overhaul 2006-10-05 10:17:08 +00:00
Denis Vlasenko
8f8f268cfd bb_applet_name -> applet_name 2006-10-03 21:00:43 +00:00
Denis Vlasenko
67b23e6043 getopt_ulflags -> getopt32.
It is impossible to formulate sane ABI based on
size of ulong because it can be 32-bit or 64-bit.
Basically it means that you cannot portably use
more that 32 option chars in one call anyway...
Make it explicit.
2006-10-03 21:00:06 +00:00
Denis Vlasenko
e175ff252f several fixes from openWRT project 2006-09-26 17:41:00 +00:00
Denis Vlasenko
22f6dcb47c login: fix getopt_ulflags fallout (wasn't taking username supplied by getty) 2006-09-26 16:31:01 +00:00
Denis Vlasenko
d9867320b4 vlock: make message shorter 2006-09-24 02:10:03 +00:00
Denis Vlasenko
a36a676923 correct_password: undo whitespace damage.
vlock + correct_password: fix incorrect line breaks in messages.
2006-09-23 13:11:49 +00:00
Denis Vlasenko
d78b433414 passwd: getopt_ulflags'isation 2006-09-23 12:30:03 +00:00
Rob Landley
e9a7a6212b Change license statements (and clean up headers) on some of the files that
Erik or I are primary copyright holders on.
2006-09-22 02:52:41 +00:00
Denis Vlasenko
2969c772c2 getty: oops... removing duplicate #include <syslog.h> 2006-09-19 14:47:54 +00:00
Denis Vlasenko
f70265290c getty: #include <syslog.h> 2006-09-19 13:50:55 +00:00
Denis Vlasenko
9213a9e0f2 whitespace cleanup 2006-09-17 16:28:10 +00:00
Denis Vlasenko
66fabdb631 login: apply fixes + getopt_ulflag'ification by Bernhard 2006-09-17 14:45:09 +00:00
Denis Vlasenko
7ccf5cc064 login: eliminate forward decls and #ifdefs 2006-09-14 17:03:18 +00:00
Bernhard Reutner-Fischer
7fee0c4357 - fix copy'n paste errors that got introduced when switching to the shorter boilerplate.
No object code changes.
2006-09-13 16:39:19 +00:00
Bernhard Reutner-Fischer
92582f2e11 - r16075 broke for de-selected FEATURE_UTMP; Partial fix that wants some more cleanup (see FIXME in the patch). 2006-09-13 15:42:47 +00:00
Rob Landley
20cc6d567f Remove pointless "const". Bloatcheck says 0 bytes difference. 2006-09-12 21:42:17 +00:00
Rob Landley
69674941dd Error reporting fix for sulogin, plus remove help entries for options we never
implemented.  (Plus a bit more of bbsh leaking in from my tree, but it
shouldn't hurt anything and I'm lazy...)
2006-09-11 00:34:01 +00:00
Denis Vlasenko
9852d5a1e6 sulogin: minor cleanup. 2006-09-09 14:00:58 +00:00
Denis Vlasenko
2f50aa42c5 login: use some ideas from util-linux's login.
O_NONBLOCKing output on login timeout.
fchmod instead of chmod (latter is racy).
is_my_tty() is not needed anymore after race is fixed
(is_my_tty() was racy too anyway...).
2006-09-08 17:56:52 +00:00
Denis Vlasenko
9a9edf200b login: make it saner and smaller by ~0.5k. 2006-09-08 17:29:53 +00:00
Denis Vlasenko
6bbd174593 login: small fixes like \n removal, bb_error_msg'ification, etc. 2006-09-08 17:26:20 +00:00
Denis Vlasenko
942e4291fe login: previous commit comment was wrong :)
That commit added login script support.
Now _this commit_ is a style fix. Sorry....
2006-09-08 17:25:04 +00:00
Denis Vlasenko
2e502914b0 login: style fixes 2006-09-08 17:22:45 +00:00
Rob Landley
dd93abeaff Shrinkage/cleanup from Tito. 2006-09-08 17:22:05 +00:00
Denis Vlasenko
a9801658ee getty, sulogin: convert to using bb_msg for syslog output 2006-09-07 16:20:03 +00:00
Denis Vlasenko
049d6b8c08 Add CONFIG_FEATURE_SYSLOG which controls whether
bb_xx_msg will ever try to send output to syslog.
Add "select CONFIG_FEATURE_SYSLOG" to relevant applets.
This allows to omit syslog code if we do not have
any syslog-capable applets in the build.
2006-09-07 06:02:39 +00:00
Denis Vlasenko
6d655be5df removed a lot of trailing \n in bb_msg() calls. It is added
automatically by function itself.
2006-09-06 19:02:46 +00:00
Denis Vlasenko
adff40e80d sulogin: fix bug: -tNNN didn't work 2006-09-03 17:11:34 +00:00
Rob Landley
f78ab5396d Antti Seppala (with dots over the last two a's) wants our getty to initialize
the terminal the way mingetty does instead of the way agetty does.  It's
a bit ugly for somebody else to be writing to a console sitting at a
login: prompt, but it's uglier when newline doesn't work as expected if
they do.
2006-08-24 20:00:44 +00:00
Rob Landley
d921b2ecc0 Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes...  General cleanup pass.  What I've
been doing for the last couple days.

And it conflicts!  I've removed httpd.c from this checkin due to somebody else
touching that file.  It builds for me.  I have to catch a bus.  (Now you know
why I'm looking forward to Mercurial.)
2006-08-03 15:41:12 +00:00
"Robert P. J. Day"
6dce0b6fa7 Remove apparent typo in "bool" line. 2006-08-03 11:28:36 +00:00
Rob Landley
62103757ef Bugfix from Tito to make sure /etc/group gets updated. 2006-07-16 18:58:18 +00:00
Rob Landley
afb94ecf2b Convert setuid/setgid users to xsetuid/xsetgid. 2006-07-16 08:06:34 +00:00
Rob Landley
1870737480 Comment tweak from tito. 2006-07-15 19:46:46 +00:00
"Robert P. J. Day"
801ab14013 Add one-line GPL boilerplate to numerous (but not all yet) source files. 2006-07-12 07:56:04 +00:00
Rob Landley
ab7d9be17c Patch from Tito to remove pwd_to_spwd (which we don't actually need), with
some #ifdef removal from me.
2006-07-11 16:19:17 +00:00
Rob Landley
3bfcf3cccc Patch from Tito to make syslog configurable and remove #ifdefs. Further
cleanups by me.
2006-07-10 03:05:46 +00:00
"Robert P. J. Day"
68229837ff Remove all usage of the "register" storage class specifier. 2006-07-01 13:08:46 +00:00
Rob Landley
cf7577d417 Missed one. Based on suggestions from Erik Hovland. 2006-06-25 22:59:31 +00:00
Rob Landley
290fcb4213 Undo all of the ugliness and some of the bloat from 15412. 2006-06-18 23:59:03 +00:00
Bernhard Reutner-Fischer
6d82f94681 - do away with the fwd-decls of functions. Should not contain any code changes
AFAICT.
2006-06-16 16:37:07 +00:00
Bernhard Reutner-Fischer
df798b7f58 - minor size tweak
text    data     bss     dec     hex filename
    613       0       0     613     265 loginutils/su.o.orig
    605       0       0     605     25d loginutils/su.o
2006-06-14 16:36:45 +00:00
Rob Landley
299a6b4d7b Consolidate #include <sys/time.h> so libbb.h does it. 2006-05-27 21:42:58 +00:00
Bernhard Reutner-Fischer
781e42d66c - introduce and use bb_path_wtmp_file for portability (saves 11 Bytes).
- fix last.c to also look at the double-underscore UT_ defines.
2006-05-26 14:41:40 +00:00
Bernhard Reutner-Fischer
b180e5a766 - use portability wrapper define bb_setpgrp. 2006-05-26 14:24:56 +00:00
Bernhard Reutner-Fischer
b1629b1b2a - remove emacs layout block as suggested by Robert P.J. Day
- use shorter boilerplate while at it
2006-05-19 19:29:19 +00:00
Mike Frysinger
39440e520c pull Rules.mak from top_srcdir as pointed out by Robert P. J. Day on the mailing list 2006-05-13 02:33:09 +00:00
Rob Landley
a389651115 Remove bb_strlen() in favor of -fno-builtin-strlen. Saves as many bytes
as the old optimization did (actually does slightly better under gcc 4.0), and
simplifies the code.
2006-05-07 20:20:34 +00:00
Ned Ludd
791976490b - passwd doesnt use salt with md5 passwords; bug #604 thanks taviso 2006-04-21 00:40:35 +00:00
Mike Frysinger
0436b9f482 use strchr() not index() 2006-04-16 05:54:31 +00:00
Rob Landley
2ec922eed5 Patch from Robert P Day: let menuconfig indent stuff for us, we don't have
to do it in Config.in.
2006-04-13 23:22:16 +00:00
Rob Landley
81c40b39cb Patch from Tito to unify deluser and delgroup, and generally shrink code. 2006-04-10 18:03:17 +00:00
Rob Landley
9a2dd51237 Rewrite/shrink by tito. 2006-04-04 19:19:53 +00:00
Rob Landley
d1f8c1c125 From Jan Kiszka: This patch fixes the security labelling of the login terminal
and process... There still remains some stuff to clean up (the whole
set_current_security_context() appears unnecessary complex to me), but this is
now at least working.
2006-03-27 23:04:42 +00:00
Mike Frysinger
06adf5fb47 2006-03-21 Shaun Jackman <sjackman@gmail.com>: Include signal.h instead of sys/signal.h. 2006-03-22 00:25:07 +00:00
Bernhard Reutner-Fischer
df10094870 - revert back to r14406 2006-03-13 19:04:00 +00:00
Bernhard Reutner-Fischer
07a79e75f5 - backout using features which are not available with the previous stable
version of make (3.71.1).
2006-03-09 09:03:37 +00:00
Rob Landley
dfba741457 Robert P. Day removed 8 gazillion occurrences of "extern" on function
definitions.  (That should only be on prototypes.)
2006-03-06 20:47:33 +00:00
Bernhard Reutner-Fischer
e3ec99de82 - remove unused lists *-m 2006-03-02 18:23:13 +00:00
Bernhard Reutner-Fischer
022eb311d5 - use absolute path for top_builddir and top_srcdir.
Fixes make trying to include the very same file in an endless loop.
2006-03-02 17:33:25 +00:00
Bernhard Reutner-Fischer
5d26126b9e - fixes parallel builds (make -j)
- use less resources for the buildsystem itself
2006-03-01 22:54:48 +00:00
Rob Landley
d6e14d8bee Don't build directory libraries unless we're building an applet that needs it.
Cherry-picked from Devin Bayer's big MacOS X patch.
2006-02-21 19:11:35 +00:00
Mike Frysinger
b38673fb9f make the build system puuuuuuuuuuurty 2006-02-02 01:41:53 +00:00
Bernhard Reutner-Fischer
3038557649 - bzero -> memset
text    data     bss     dec     hex filename
1652855   14444 1215616 2882915  2bfd63 busybox.oorig.gcc-3.3
1652823   14444 1215616 2882883  2bfd43 busybox.gcc-3.3
1603655   14412 1215552 2833619  2b3cd3 busybox.oorig.gcc-3.4
1603655   14412 1215552 2833619  2b3cd3 busybox.gcc-3.4
1609755   14508 1215744 2840007  2b55c7 busybox.oorig.gcc-4.0
1609755   14508 1215744 2840007  2b55c7 busybox.gcc-4.0
1590495   13516 1215392 2819403  2b054b busybox.oorig.gcc-4.1-HEAD
1590495   13516 1215392 2819403  2b054b busybox.gcc-4.1-HEAD
1589079   13036 1213248 2815363  2af583 busybox.oorig.gcc-4.2-HEAD
1589079   13036 1213248 2815363  2af583 busybox.gcc-4.2-HEAD
2006-01-31 17:57:48 +00:00
"Vladimir N. Oleynik"
39e7510664 more destroy potential overflow for x86_64. 2006-01-31 11:19:12 +00:00
"Vladimir N. Oleynik"
77bb33c474 destroy potential overflow for x86_64. Added ATTRIBUTE_UNUSED 2006-01-31 11:16:40 +00:00
Eric Andersen
a68ea1cb93 fix up yet more annoying signed/unsigned and mixed type errors 2006-01-30 22:48:39 +00:00
Tim Riker
c1ef7bdd8d just whitespace 2006-01-25 00:08:53 +00:00
Bernhard Reutner-Fischer
86f5c9906b - add platform.h.
- use shorter boilerplate while at it.
2006-01-22 22:55:11 +00:00
Bernhard Reutner-Fischer
5a620ea220 - Document -m, -c, -s and provide a default shell for standalone build.
- Wrap overlong lines plus a few whitespace fixes.
- add GPL header.
2006-01-19 18:04:15 +00:00
Bernhard Reutner-Fischer
7ca61b6f33 - shared libbusybox.
- IMA compilation option (aka IPO, IPA,..)
Please holler if i broke something..
2006-01-15 14:04:57 +00:00
Mike Frysinger
e87ae0bd4f declare const for fun 2006-01-08 11:15:53 +00:00
Rob Landley
84cb76733f patch from tito: consolidate delay functions as bb_do_delay() 2006-01-06 20:59:09 +00:00
Rob Landley
beb665a376 Second attempt to simplify the login menu. Shadow password stuff at the top,
with no dependencies (since depending on 9 of the 13 apps in the menu gets
a bit silly).  And fix my attempt to make internal shadow password support
automatically depend on internal password support plus shadow password
support.
2005-12-21 16:33:41 +00:00
Rob Landley
b9620414c1 Shadow password support went beyond the dependency event horizon, just make
it an independent menu.  And make internal shadow password support a subset
of the other internal password function support.
2005-12-20 15:25:25 +00:00
Rob Landley
b3f05a467a Shadow password support involves vlock too. 2005-12-19 02:52:48 +00:00
Rob Landley
68eb9dd371 Patch from Tito to make vlock much smaller. 2005-12-19 02:50:10 +00:00
Rob Landley
553d83d427 strncmp isn't automatically superior to strcmp. Especially when it isn't
used right.
2005-12-18 20:34:41 +00:00
"Vladimir N. Oleynik"
4a9d6d1fe9 remove strange bloat dup2() usage, sync this code with mainstream login-utils, size reduce 2005-12-13 08:44:41 +00:00
Mike Frysinger
4ee2eee2fc Quote the user we pass to addgroup so funky chars are preserved. Fix by dragan_marinkovic in Bug 544 2005-11-15 05:53:00 +00:00
"Vladimir N. Oleynik"
6f347ef9dc common BUFSIZ BSS buffer, small reduce code, data and bss 2005-10-15 10:23:55 +00:00
"Vladimir N. Oleynik"
39a841cecf change interface to bb_xasprintf() - more perfect for me.
ln.c: error_msg(str)->error_msg(%s, str) - remove standart "feature" for hackers
reduce 100 bytes don't care in sum
2005-09-29 16:18:57 +00:00
"Vladimir N. Oleynik"
3e245c9e21 getty must chdir(/). Use bb_getopt_ulflags. Indent. error() perfect 2005-09-29 11:31:26 +00:00
Mike Frysinger
62f18e1f20 use the shorter license header 2005-09-24 07:16:29 +00:00
Mike Frysinger
0d4ee68be5 use brief license line 2005-09-24 06:01:57 +00:00
Bernhard Reutner-Fischer
d5bd137a24 - rename libbb's password helpers as suggested in libbb.h
my_getpwnam -> bb_xgetpwnam  /* dies on error */
  my_getgrnam -> bb_xgetgrnam  /* dies on error */
  my_getgrgid -> bb_getgrgid
  my_getpwuid -> bb_getpwuid
  my_getug    -> bb_getug
2005-09-20 21:06:17 +00:00
Eric Andersen
77804ce53d The change in getty.c in Busybox 1.01 caused the /etc/issue file to not
be displayed unless CONFIG_FEATURE_UTMP is set.  This was not the intended
result.
2005-07-27 06:05:38 +00:00
Mike Frysinger
4d00896d05 use toplevel ARFLAGS and update default ARFLAGS to be quiet 2005-07-27 01:09:24 +00:00
Mike Frysinger
b381009740 2005-06-30 Shaun Jackman <sjackman@gmail.com>
* loginutils/getty.c: (open_tty): Use dup2 instead of close/dup.
2005-07-01 01:29:44 +00:00
Mike Frysinger
f413e241ba 2005-06-30 Shaun Jackman <sjackman@gmail.com>
* loginutils/getty.c: Include utmp.h only if
        CONFIG_FEATURE_U_W_TMP is defined.
        (getty_main): Use ISSUE only if it is defined.
2005-07-01 01:07:16 +00:00
Mike Frysinger
8deb686d2e Patch by jonlar in Bug 312 to split the U_W_TMP feature into sep UTMP and WTMP options 2005-07-01 01:04:32 +00:00
Rob Landley
60158cb93e A patch from Takeharu KATO to update/fix SE-Linux support. 2005-05-03 06:25:50 +00:00
Eric Andersen
14f5c8d764 Patch from Bernhard Fischer to make a bunch of symbols static
which were otherwise cluttering the global namespace.
2005-04-16 19:39:00 +00:00
Mike Frysinger
4e5936ef95 In Bug 208, bernhardf writes:
On machines with only ANSI compliant compilers, not explitily delcaring
an empty parameter list 'void' causes failure.
2005-04-16 04:30:38 +00:00
Eric Andersen
afe023d136 Use a sane VEOL setting 2005-04-14 20:48:58 +00:00
Eric Andersen
7daa076d3e egor duda writes:
Hi!

I've created a patch to busybox' build system to allow building it in
separate tree in a manner similar to kbuild from kernel version 2.6.

That is, one runs command like
'make O=/build/some/where/for/specific/target/and/options'
and everything is built in this exact directory, provided that it exists.

I understand that applyingc such invasive changes during 'release
candidates' stage of development is at best unwise. So, i'm currently
asking for comments about this patch, starting from whether such thing
is needed at all to whether it coded properly.

'make check' should work now, and one make creates Makefile in build
directory, so one can run 'make' in build directory after that.

One possible caveat is that if we build in some directory other than
source one, the source directory should be 'distclean'ed first.

egor
2004-10-08 07:46:08 +00:00
Glenn L McGrath
995d96a99d Only write to shadow file is shadow passwords are enabled. Patch by magicfox modified by myself to retain check for shadow file access. 2004-09-15 02:39:09 +00:00
Glenn L McGrath
d2bd7d8dd5 Patch from tito to add argument checking. 2004-09-14 16:08:02 +00:00
Eric Andersen
192c35f6eb Tito writes:
The second patch contains:
1) a size optimization for adduser.c
2) removes a warning about an unused variable in syslogd.c if CONFIG_FEATURE_REMOTE_LOG is not set
3)cosmetic fixes for addgroup_full_usage and adduser_full_usage

Ciao,
Tito
2004-09-02 22:22:17 +00:00
Eric Andersen
7eb79fff10 Tito writes:
Hi Erik,
Hi to all,
This is part five of the my_get*id story.
I've tweaked a bit this two functions to make them more flexible,
but this changes will not affect existing code.
Now they work so:
1) my_getpwuid( char *user, uid_t uid, int bufsize)

   if bufsize is > 0 char *user cannot be set to NULL
                     on success username is written on static allocated buffer
                     on failure uid as string is written to buffer and NULL is returned
   if bufsize is = 0 char *user can be set to NULL
                     on success username is returned
                     on failure NULL is returned
   if bufsize is < 0 char *user can be set to NULL
                     on success username is returned
                     on failure an error message is printed and the program exits

  2) 1) my_getgrgid( char *group, uid_t uid, int bufsize)

   if bufsize is > 0 char *group cannot be set to NULL
                     on success groupname is written on static allocated buffer
                     on failure gid as string is written to buffer and NULL is returned
   if bufsize is = 0 char *group can be set to NULL
                     on success groupname is returned
                     on failure NULL is returned
   if bufsize is < 0 char *group can be set to nULL
                     on success groupname is returned
                     on failure an error message is printed and the program exits

This changes were needed mainly for my new id applet.
It is somewhat bigger then the previous but matches the behaviour of GNU id
and is capable to handle usernames of whatever length.
BTW: at a first look it seems to me that it will integrate well (with just a few changes)
with the pending patch  in patches/id_groups_alias.patch.
The increase in size is balanced by the removal of my_getpwnamegid.c
from libbb as this was used only in previous id applet and by size optimizations
made possible in whoami.c and in passwd.c.
I know that we are in feature freeze but I think that i've tested it enough
(at least I hope so.......).
2004-09-02 22:21:41 +00:00
Eric Andersen
138791050d Improve the setuid situation a bit, and make it more apparent
when people really ought to make busybox setuid root.
 -Erik
2004-08-26 23:13:00 +00:00
Eric Andersen
713d6e3dd3 Save a line or two 2004-08-26 22:26:26 +00:00
Glenn L McGrath
b619419962 Patch from Manousaridis Angelos to cleanup stale file descriptors, it was preventing unmounting an initial filesystem. 2004-08-25 02:02:19 +00:00
Eric Andersen
88e38ca2fb Bertrand Baudet writes:
Looks like the -D and -H options of the adduser applet aren't handle
properly in BusyBox.

This patch fixes the masks definition for those options according to
there position in the optstring.

Patch against RC2 but should also apply cleanly against CVS.

Bertrand
2004-08-16 09:07:39 +00:00
Eric Andersen
b737b1a68b Umm. Not guilty by reason of insanity.
-Erik
2004-07-30 17:39:08 +00:00
Eric Andersen
aad29b37a7 Fixup getty, login, etc so the utmp and wtmp are updated, allowing
the 'who' and 'last' applets among other things to work as expected.
 -Erik
2004-07-30 17:24:47 +00:00
Eric Andersen
36adca81f5 Patch from Bastian Blank:
On Sat, Jun 19, 2004 at 10:57:37PM +0200, Bastian Blank wrote:
> The following patch changes klogd to use openlog/syslog themself
> instead of calling syslog_msg which always calls the triple
> openlog/syslog/closelog.

Updated patch: get rid of syslog_msg entirely. Request from Erik Andersen.

Bastian
2004-06-22 10:07:17 +00:00
Eric Andersen
6f9a7783ce Do not use getpass(3) 2004-05-01 01:27:30 +00:00
Eric Andersen
aff114c33d Larry Doolittle writes:
This is a bulk spelling fix patch against busybox-1.00-pre10.
If anyone gets a corrupted copy (and cares), let me know and
I will make alternate arrangements.

Erik - please apply.

Authors - please check that I didn't corrupt any meaning.

Package importers - see if any of these changes should be
passed to the upstream authors.

I glossed over lots of sloppy capitalizations, missing apostrophes,
mixed American/British spellings, and German-style compound words.

What is "pretect redefined for test" in cmdedit.c?

Good luck on the 1.00 release!

      - Larry
2004-04-14 17:51:38 +00:00
Eric Andersen
b37f883478 Sigh. The patch from David Anders (prpplague) broke standard
securetty files since the /dev was not stripped.
2004-04-12 22:49:06 +00:00