C importance.

18 February 2009

During last months I had experience in C teaching. Many students told me that C is not important : in their opinion it is obsolete, useless, less attractive than other object oriented languages (someone included VisualBasic 6 also :-) ). Well this morning my Linux Box alerted me with new updates included security option for “sudo” command. I gave a look to the description of the problem and this is the code updated (if you have some C basics you shoudn’t have difficutl in reading and understanding it) :

static int command_matches_dir __P((char *, size_t));
@@ -651,9 +651,11 @@ usergr_matches(group, user, pw)
     /*
      * If the user has a supplementary group vector, check it first.
      */
-    for (i = 0; i < user_ngroups; i++) {
-	if (grp->gr_gid == user_groups[i])
-	    return(TRUE);
+    if (strcmp(user, user_name) == 0) {
+	for (i = 0; i < user_ngroups; i++) {
+	    if (grp->gr_gid == user_groups[i])
+		return(TRUE);
+	}
     }
     if (grp->gr_mem != NULL) {

 	for (cur = grp->gr_mem; *cur; cur++) {

Now I ask : is it the C language really useless?

Entry Filed under: linux, security, software. Tags: .

2 Comments Add your own

  • 1. Giancarlo  |  18 February 2009 at 12:38 pm

    C is not obsolete, and University must teach computer programming, it not teach the cool language of the day.
    If you know computer programming you know how to use any programming language, but it is difficult to tell students.

    PS
    Excuse me for my horrible english :)

    Reply
  • 2. nexthing  |  18 February 2009 at 4:22 pm

    You’re right!

    Reply

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Recent Posts

a

Archives

Visitors to this site

Top Clicks